From 15e60818c908e58d53580e3fd049e452b2133610 Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Sat, 17 Jun 2023 17:02:10 -0700 Subject: [PATCH 1/3] pin nixos-unstable, update flake.lock `nixos-unstable` is the rolling release channel of NixOS. The default is the master branch, which doesn't always have a populated binary cache and so may result in compiling a bunch of stuff unnecessarily. --- flake.lock | 55 ++++++++++++++++++++++++++++++++++++------------------ flake.nix | 2 +- 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/flake.lock b/flake.lock index d76ff59b..b69bb8c0 100644 --- a/flake.lock +++ b/flake.lock @@ -12,11 +12,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1680584903, - "narHash": "sha256-uraq+D3jcLzw/UVk0xMHcnfILfIMa0DLrtAEq2nNlxU=", + "lastModified": 1686621798, + "narHash": "sha256-FUwWszmSiDzUdTk8f69xwMoYlhdPaLvDaIYOE/y6VXc=", "owner": "ipetkov", "repo": "crane", - "rev": "65d3f6a3970cd46bef5eedfd458300f72c56b3c5", + "rev": "75f7d715f8088f741be9981405f6444e2d49efdd", "type": "github" }, "original": { @@ -33,11 +33,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1680607374, - "narHash": "sha256-U5iiPqbAanr+sQCCZ7zxYhwCXdcDpish8Uy4ELZeXM0=", + "lastModified": 1687004852, + "narHash": "sha256-wRSUs+v8xtIJaFlWO5NLFQjkq5+eYhxHHXnZKsZ9DpQ=", "owner": "nix-community", "repo": "fenix", - "rev": "e70d498e97017daa59363eafa054619d4fa160c3", + "rev": "df0a6e4ec44b4a276acfa5a96d2a83cb2dfdc791", "type": "github" }, "original": { @@ -63,12 +63,15 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "owner": "numtide", "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "type": "github" }, "original": { @@ -79,15 +82,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1680652733, - "narHash": "sha256-FFG6Nai9M71C0Uc+D8TxyHoAjTplM0/9uWKsl7ALfUs=", + "lastModified": 1686960236, + "narHash": "sha256-AYCC9rXNLpUWzD9hm+askOfpliLEC9kwAo7ITJc4HIw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cc5bde408572508efd1273852862d418bb313443", + "rev": "04af42f3b31dba0ef742d254456dc4c14eedac86", "type": "github" }, "original": { "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -103,11 +107,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1680435407, - "narHash": "sha256-IPBtZCOh3BdrR+V77cL7r6WQnclWcZ/85BDYnmq/GnQ=", + "lastModified": 1686936697, + "narHash": "sha256-mCoPr1nNWKpsoGMBFaK/sswkLloRCZuoWi2a+OKs3vk=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "236576227a299fd19ba836b1834ab50c948af994", + "rev": "a5a71c75e62a0eaa1b42a376f7cf3d348cb5dec6", "type": "github" }, "original": { @@ -129,11 +133,11 @@ ] }, "locked": { - "lastModified": 1680488274, - "narHash": "sha256-0vYMrZDdokVmPQQXtFpnqA2wEgCCUXf5a3dDuDVshn0=", + "lastModified": 1685759304, + "narHash": "sha256-I3YBH6MS3G5kGzNuc1G0f9uYfTcNY9NYoRc3QsykLk4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7ec2ff598a172c6e8584457167575b3a1a5d80d8", + "rev": "c535b4f3327910c96dcf21851bbdd074d0760290", "type": "github" }, "original": { @@ -141,6 +145,21 @@ "repo": "rust-overlay", "type": "github" } + }, + "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", diff --git a/flake.nix b/flake.nix index 970e8474..669d90ab 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs"; + nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; fenix = { From 4a7d3c7301bc86655299345f264cf151c17faceb Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Sat, 17 Jun 2023 17:04:11 -0700 Subject: [PATCH 2/3] upgrade rust in Cargo.toml/flake.nix Looks like this should've happened as part of !479. --- Cargo.toml | 2 +- flake.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c925bf2e..c50f3d3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" # `nix flake update`. If you don't have Nix installed or otherwise don't know # how to do this, ping `@charles:computer.surgery` or `@dusk:gaze.systems` in # the matrix room. -rust-version = "1.64.0" +rust-version = "1.70.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/flake.nix b/flake.nix index 669d90ab..ba8e8297 100644 --- a/flake.nix +++ b/flake.nix @@ -40,7 +40,7 @@ channel = cargoToml.package.rust-version; # THE rust-version HASH - sha256 = "sha256-8len3i8oTwJSOJZMosGGXHBL5BVuGQnWOT2St5YAUFU="; + sha256 = "sha256-gdYqng0y9iHYzYPAdkC/ka3DRny3La/S5G8ASj0Ayyc="; }; # The system's RocksDB From abd0a014e852d41d25320f6ccd19ac1de4156f96 Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Sat, 17 Jun 2023 17:04:57 -0700 Subject: [PATCH 3/3] nixpkgs' rocksdb is too old :( --- flake.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index ba8e8297..5de5621a 100644 --- a/flake.nix +++ b/flake.nix @@ -43,10 +43,6 @@ sha256 = "sha256-gdYqng0y9iHYzYPAdkC/ka3DRny3La/S5G8ASj0Ayyc="; }; - # The system's RocksDB - ROCKSDB_INCLUDE_DIR = "${pkgs.rocksdb_6_23}/include"; - ROCKSDB_LIB_DIR = "${pkgs.rocksdb_6_23}/lib"; - # Shared between the package and the devShell nativeBuildInputs = (with pkgs.rustPlatform; [ bindgenHook @@ -61,9 +57,7 @@ inherit stdenv - nativeBuildInputs - ROCKSDB_INCLUDE_DIR - ROCKSDB_LIB_DIR; + nativeBuildInputs; }; devShells.default = (pkgs.mkShell.override { inherit stdenv; }) { @@ -71,10 +65,6 @@ # sources, and it can read this environment variable to do so RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library"; - inherit - ROCKSDB_INCLUDE_DIR - ROCKSDB_LIB_DIR; - # Development tools nativeBuildInputs = nativeBuildInputs ++ (with toolchain; [ cargo