From 5d7b8cd30933eda45457fba60e8cf32944dbe1e3 Mon Sep 17 00:00:00 2001 From: strawberry Date: Wed, 14 Feb 2024 13:28:28 -0500 Subject: [PATCH] think this is the correct way Signed-off-by: strawberry --- flake.nix | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index 15561be9..8319b0fd 100644 --- a/flake.nix +++ b/flake.nix @@ -32,27 +32,15 @@ let pkgsHost = nixpkgs.legacyPackages.${system}; - pkgs = import nixpkgs { - inherit system; - - overlays = [ - (final: prev: { - rocksdb = prev.rocksdb.overrideAttrs (old: - let - version = "8.10.0"; - in + rocksdb' = pkgs: pkgs.rocksdb.overrideAttrs (old: { - inherit version; src = pkgs.fetchFromGitHub { owner = "facebook"; repo = "rocksdb"; - rev = "v${version}"; + rev = "v8.10.0"; hash = "sha256-KGsYDBc1fz/90YYNGwlZ0LUKXYsP1zyhP29TnRQwgjQ="; }; }); - }) - ]; - }; # Nix-accessible `Cargo.toml` cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml); @@ -76,8 +64,8 @@ ]; env = pkgs: { - ROCKSDB_INCLUDE_DIR = "${pkgs.rocksdb}/include"; - ROCKSDB_LIB_DIR = "${pkgs.rocksdb}/lib"; + ROCKSDB_INCLUDE_DIR = "${rocksdb' pkgs}/include"; + ROCKSDB_LIB_DIR = "${rocksdb' pkgs}/lib"; } // pkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isStatic { ROCKSDB_STATIC = "";