Switch to Flakes and mkShell

master
Graham 1 year ago
parent e96e3cd0ca
commit 145d2f79b7
  1. 60
      flake.lock
  2. 13
      flake.nix
  3. 10
      shell.nix

@ -0,0 +1,60 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1695272228,
"narHash": "sha256-4uw2OdJPVyjdB+xcDst9SecrNIpxKXJ2usN3M5HVa7o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "55ac2a9d2024f15c56adf20da505b29659911da8",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.05",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

@ -0,0 +1,13 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system: {
devShells.default = import ./shell.nix {
pkgs = nixpkgs.legacyPackages.${system};
};
});
}

@ -1,10 +1,8 @@
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
( pkgs.mkShell {
pkgs.buildFHSUserEnv {
name = "openrs2-natives"; name = "openrs2-natives";
targetPkgs = pkgs: ( packages = with pkgs; [
with pkgs; [
gcc gcc
jdk11 jdk11
libglvnd.dev libglvnd.dev
@ -12,7 +10,5 @@
xorg.libX11.dev xorg.libX11.dev
xorg.libXt.dev xorg.libXt.dev
xorg.xorgproto xorg.xorgproto
] ];
);
} }
).env

Loading…
Cancel
Save