nix flake cleanup (#7576)

* nix flake cleanup

* fix devtools

* remove old zig version check

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
This commit is contained in:
Anton-4 2025-02-04 19:05:57 +01:00 committed by GitHub
parent 5261062aed
commit 5e4ff44483
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 104 deletions

View file

@ -17,7 +17,7 @@ jobs:
# These started to accumulate quickly since #5990, not sure why
- name: Clean up old nix shells
run: rm -rf /private/tmp/nix-shell.*
- name: check formatting with rustfmt
run: nix develop -c cargo fmt --all -- --check

68
devtools/flake.lock generated
View file

@ -3,11 +3,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
@ -21,11 +21,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -38,11 +38,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -51,44 +51,19 @@
"type": "github"
}
},
"nixgl": {
"inputs": {
"flake-utils": [
"roc",
"flake-utils"
],
"nixpkgs": [
"roc",
"nixpkgs"
]
},
"locked": {
"lastModified": 1710868679,
"narHash": "sha256-V1o2bCZdeYKP/0zgVp4EN0KUjMItAMk6J7SvCXUI5IU=",
"owner": "guibou",
"repo": "nixGL",
"rev": "d709a8abcde5b01db76ca794280745a43c8662be",
"type": "github"
},
"original": {
"owner": "guibou",
"repo": "nixGL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1712163089,
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
"lastModified": 1722403750,
"narHash": "sha256-tRmn6UiFAPX0m9G1AVcEPjWEOc9BtGsxGcs7Bz3MpsM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
"rev": "184957277e885c06a505db112b35dfbec7c60494",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
"rev": "184957277e885c06a505db112b35dfbec7c60494",
"type": "github"
}
},
@ -96,13 +71,12 @@
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"nixgl": "nixgl",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1727455099,
"narHash": "sha256-/tqXI2VIsx+OmXxYAUqOnzfQ2JqWBJJ32IjwzGMxg0A=",
"lastModified": 1738668249,
"narHash": "sha256-VsJbSkTfh9gooNfEWEfrvfcukdg5xKpUXr186T0dtUI=",
"path": "/home/username/gitrepos/roc",
"type": "path"
},
@ -119,21 +93,17 @@
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"roc",
"flake-utils"
],
"nixpkgs": [
"roc",
"nixpkgs"
]
},
"locked": {
"lastModified": 1713150335,
"narHash": "sha256-Ic7zCPfiSYc9nFFp+E44WFk3TBJ99J/uPZ4QXX+uPPw=",
"lastModified": 1736303309,
"narHash": "sha256-IKrk7RL+Q/2NC6+Ql6dwwCNZI6T6JH2grTdJaVWHF0A=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "b186d85e747e2b7bee220ec95839fb66c868dc47",
"rev": "a0b81d4fa349d9af1765b0f0b4a899c13776f706",
"type": "github"
},
"original": {
@ -175,4 +145,4 @@
},
"root": "root",
"version": 7
}
}

View file

@ -55,7 +55,6 @@
# env vars
NIX_GLIBC_PATH = rocShell.NIX_GLIBC_PATH;
LD_LIBRARY_PATH = rocShell.LD_LIBRARY_PATH;
NIXPKGS_ALLOW_UNFREE = rocShell.NIXPKGS_ALLOW_UNFREE;
# to set the LLVM_SYS_<VERSION>_PREFIX
shellHook = rocShell.shellHook;

24
flake.lock generated
View file

@ -34,29 +34,6 @@
"type": "github"
}
},
"nixgl": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1713543440,
"narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=",
"owner": "guibou",
"repo": "nixGL",
"rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a",
"type": "github"
},
"original": {
"owner": "guibou",
"repo": "nixGL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1722403750,
@ -77,7 +54,6 @@
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixgl": "nixgl",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}

View file

@ -11,12 +11,6 @@
};
# to easily make configs for multiple architectures
flake-utils.url = "github:numtide/flake-utils";
# to be able to use vulkan system libs for graphics in examples/gui
nixgl = {
url = "github:guibou/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
# for non flake backwards compatibility
flake-compat = {
@ -25,7 +19,7 @@
};
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, nixgl, ... }@inputs:
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }@inputs:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ];
@ -38,7 +32,6 @@
let
overlays = [ (import rust-overlay) ]
++ (if system == "x86_64-linux" then [ nixgl.overlay ] else [ ])
++ [(final: prev: {
# using a custom simple-http-server fork because of github.com/TheWaWaR/simple-http-server/issues/111
# the server is used for local testing of the roc website
@ -56,15 +49,6 @@
linuxDevInputs = with pkgs;
lib.optionals stdenv.isLinux [
valgrind # used in cli tests, see cli/tests/cli_tests.rs
vulkan-headers # here and below is all graphics stuff for examples/gui
vulkan-loader
vulkan-tools
vulkan-validation-layers
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
xorg.libxcb
cargo-llvm-cov # to visualize code coverage
curl # used by www/build.sh
];
@ -73,8 +57,6 @@
darwinDevInputs = with pkgs;
lib.optionals stdenv.isDarwin
(with pkgs.darwin.apple_sdk.frameworks; [
CoreVideo # for examples/gui
Metal # for examples/gui
curl # for wasm-bindgen-cli libcurl (see ./ci/www-repl.sh)
]);
@ -107,8 +89,6 @@
sharedDevInputs = (with pkgs; [
git
python3
libiconv # for examples/gui
libxkbcommon # for examples/gui
cargo-criterion # for benchmarks
wasm-pack # for repl_wasm
jq # used in several bash scripts
@ -127,11 +107,7 @@
{
devShell = pkgs.mkShell {
buildInputs = sharedInputs ++ sharedDevInputs ++ darwinInputs ++ darwinDevInputs ++ linuxDevInputs
++ (if system == "x86_64-linux" then
[ pkgs.nixgl.nixVulkanIntel ]
else
[ ]);
buildInputs = sharedInputs ++ sharedDevInputs ++ darwinInputs ++ darwinDevInputs ++ linuxDevInputs;
# nix does not store libs in /usr/lib or /lib
# for libgcc_s.so.1
@ -146,9 +122,6 @@
([ pkg-config stdenv.cc.cc.lib libffi ncurses zlib ]
++ linuxDevInputs);
NIXPKGS_ALLOW_UNFREE =
1; # to run the GUI examples with NVIDIA's closed source drivers
shellHook = ''
export LLVM_SYS_180_PREFIX="${llvmPkgs.dev}"
${aliases}