mirror of
https://github.com/nix-community/naersk
synced 2024-11-23 04:03:04 +00:00
Clean up unused argument
This commit is contained in:
parent
6c1d36a3a9
commit
9787ccbeee
3 changed files with 6 additions and 7 deletions
|
@ -227,12 +227,11 @@ with rec
|
|||
# anything changes all the deps will be rebuilt. The rustc compiler is
|
||||
# pretty fast so this is not too bad. In the future we'll want to pre-build
|
||||
# the crates and give cargo a pre-populated ./target directory.
|
||||
# TODO: this should most likely take more than one packageName
|
||||
mkSnapshotForest = packageName:
|
||||
mkSnapshotForest =
|
||||
symlinkJoin
|
||||
{ name = "crates-io";
|
||||
paths = map (v: unpackCrate v.name v.version v.sha256)
|
||||
(libb.mkVersions packageName cargolock);
|
||||
(libb.mkVersions cargolock);
|
||||
};
|
||||
|
||||
# All the Cargo.tomls, including the top-level one
|
||||
|
@ -252,7 +251,7 @@ with rec
|
|||
{ source =
|
||||
{ crates-io = { replace-with = "nix-sources"; } ;
|
||||
nix-sources =
|
||||
{ directory = mkSnapshotForest (lib.head crateNames) ; };
|
||||
{ directory = mkSnapshotForest; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -43,7 +43,7 @@ with rec
|
|||
# # Really this should be 'buildPackageIncremental' but that makes
|
||||
# # Nix segfault
|
||||
# buildPackage (libb.dummySrc depName depVersion)
|
||||
# { cargoBuild = "cargo build --release -p ${depName}:${depVersion} -j $NIX_BUILD_CORES";
|
||||
# { cargoBuild = "cargo build --$CARGO_BUILD_PROFILE -p ${depName}:${depVersion} -j $NIX_BUILD_CORES";
|
||||
# inherit (attrs) cargo;
|
||||
# cargotomlPath = libb.writeTOML (libb.cargotomlFor depName depVersion);
|
||||
# cargolockPath = libb.writeTOML (
|
||||
|
|
4
lib.nix
4
lib.nix
|
@ -3,7 +3,7 @@ rec
|
|||
{
|
||||
# creates an attrset from package name to package version + sha256
|
||||
# (note: this includes the package's dependencies)
|
||||
mkVersions = packageName: cargolock:
|
||||
mkVersions = cargolock:
|
||||
if builtins.hasAttr "metadata" cargolock then
|
||||
|
||||
# TODO: this should nub by <pkg-name>-<pkg-version>
|
||||
|
@ -16,7 +16,7 @@ rec
|
|||
) ++ (lib.concatMap (parseDependency cargolock) (x.dependencies or []))
|
||||
|
||||
)
|
||||
(builtins.filter (v: v.name != packageName) cargolock.package))
|
||||
cargolock.package)
|
||||
else [];
|
||||
|
||||
# Turns "lib-name lib-ver (registry+...)" to [ { name = "lib-name", etc } ]
|
||||
|
|
Loading…
Reference in a new issue