pkgs/conduit: remove dependency on fenix and crane

This commit is contained in:
Nikodem Rabuliński 2025-05-01 10:30:18 +02:00
parent ff4457c267
commit e809826dc8
Signed by: nrabulinski
SSH key fingerprint: SHA256:AZZVyfKStaCo8sbJB+3Rr/CRrlym1oEgw7vMnynJeR8
4 changed files with 16 additions and 80 deletions

51
flake.lock generated
View file

@ -45,9 +45,7 @@
},
"attic": {
"inputs": {
"crane": [
"crane"
],
"crane": "crane",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"lix": [
@ -111,11 +109,11 @@
},
"crane": {
"locked": {
"lastModified": 1742394900,
"narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=",
"lastModified": 1745454774,
"narHash": "sha256-oLvmxOnsEKGtwczxp/CwhrfmQUG2ym24OMWowcoRhH8=",
"owner": "ipetkov",
"repo": "crane",
"rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd",
"rev": "efd36682371678e2b6da3f108fdb5c613b3ec598",
"type": "github"
},
"original": {
@ -165,27 +163,6 @@
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1742452566,
"narHash": "sha256-sVuLDQ2UIWfXUBbctzrZrXM2X05YjX08K7XHMztt36E=",
"owner": "nix-community",
"repo": "fenix",
"rev": "7d9ba794daf5e8cc7ee728859bc688d8e26d5f06",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"firefox-darwin": {
"inputs": {
"nixpkgs": [
@ -609,10 +586,8 @@
"agenix": "agenix",
"attic": "attic",
"conduit-src": "conduit-src",
"crane": "crane",
"darwin": "darwin",
"disko": "disko",
"fenix": "fenix",
"firefox-darwin": "firefox-darwin",
"helix": "helix",
"home-manager": "home-manager",
@ -629,23 +604,6 @@
"zjstatus": "zjstatus"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1742296961,
"narHash": "sha256-gCpvEQOrugHWLimD1wTFOJHagnSEP6VYBDspq96Idu0=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "15d87419f1a123d8f888d608129c3ce3ff8f13d4",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
@ -818,6 +776,7 @@
"zjstatus": {
"inputs": {
"crane": [
"attic",
"crane"
],
"flake-utils": "flake-utils_3",

View file

@ -47,13 +47,6 @@
url = "gitlab:famedly/conduit?ref=next";
flake = false;
};
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
crane = {
url = "github:ipetkov/crane";
};
firefox-darwin = {
url = "github:bandithedoge/nixpkgs-firefox-darwin";
inputs.nixpkgs.follows = "nixpkgs";
@ -64,7 +57,6 @@
attic = {
url = "git+https://git.lix.systems/nrabulinski/attic.git";
inputs.nixpkgs.follows = "nixpkgs";
inputs.crane.follows = "crane";
inputs.lix.follows = "lix";
inputs.lix-module.follows = "lix-module";
};
@ -75,7 +67,7 @@
zjstatus = {
url = "github:dj95/zjstatus";
inputs.nixpkgs.follows = "nixpkgs";
inputs.crane.follows = "crane";
inputs.crane.follows = "attic/crane";
};
lix = {
url = "git+https://git.lix.systems/lix-project/lix.git";

View file

@ -1,10 +1,6 @@
{
lib,
stdenv,
pkgs,
system,
fenix,
crane,
src,
libiconv,
rocksdb,
@ -12,27 +8,18 @@
rustPlatform,
}:
let
rust =
with fenix.${system};
combine [
stable.cargo
stable.rustc
];
crane' = (crane pkgs).overrideToolchain rust;
rocksdb' = rocksdb.overrideAttrs (
final: prev: {
version = "9.1.1";
src = prev.src.override {
rev = "v${final.version}";
hash = "sha256-/Xf0bzNJPclH9IP80QNaABfhj4IAR5LycYET18VFCXc=";
};
}
);
manifest = (builtins.fromTOML (builtins.readFile "${src}/Cargo.toml")).package;
in
crane'.buildPackage {
rustPlatform.buildRustPackage {
pname = manifest.name;
inherit (manifest) version;
inherit src;
strictDeps = true;
useFetchCargoVendor = true;
cargoHash = "sha256-wESDxtKRMm/jyCr4kc20UuHGcE2s+OCMjfL+l1XihnA=";
nativeBuildInputs = [ rustPlatform.bindgenHook ];
buildInputs = lib.optionals stdenv.isDarwin [
@ -42,8 +29,8 @@ crane'.buildPackage {
];
# Use system RocksDB
ROCKSDB_INCLUDE_DIR = "${rocksdb'}/include";
ROCKSDB_LIB_DIR = "${rocksdb'}/lib";
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
NIX_OUTPATH_USED_AS_RANDOM_SEED = "randomseed";
CONDUIT_VERSION_EXTRA = src.shortRev;
}

View file

@ -17,8 +17,6 @@ in
package = import ./conduit;
settings.args = {
src = config.inputs.conduit-src.result;
crane = config.inputs.crane.result.mkLib;
fenix = config.inputs.fenix.result.packages;
};
};