forked from ipetkov/crane
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The pure lib contains the parts of the Crane lib that don’t depend on `pkgs`, and is exposed via the usual `lib` flake output. The result of `mkLib` contains all of `lib`. Fixes ipetkov#699.
- Loading branch information
Showing
17 changed files
with
91 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{ pkgs ? import <nixpkgs> { } }: | ||
{ pkgs ? import <nixpkgs> { } | ||
, pureLib ? import ./pure-lib { inherit (pkgs) lib; } | ||
}: | ||
|
||
pkgs.callPackage ./lib { } | ||
pkgs.callPackage ./lib { inherit pureLib; } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ lib | ||
}: | ||
|
||
let | ||
minSupported = "24.05"; | ||
current = lib.concatStringsSep "." (lib.lists.sublist 0 2 (lib.splitVersion lib.version)); | ||
isUnsupported = lib.versionOlder current minSupported; | ||
msg = "crane requires at least nixpkgs-${minSupported}, supplied nixpkgs-${current}"; | ||
|
||
pureLib = | ||
let | ||
internalCrateNameFromCargoToml = import ./internalCrateNameFromCargoToml.nix { inherit lib; }; | ||
internalCrateNameForCleanSource = import ./internalCrateNameForCleanSource.nix { | ||
inherit internalCrateNameFromCargoToml; | ||
}; | ||
|
||
filterCargoSources = import ./filterCargoSources.nix { inherit lib; }; | ||
|
||
registryFromDownloadUrl = import ./registryFromDownloadUrl.nix { inherit lib; }; | ||
in | ||
{ | ||
inherit filterCargoSources registryFromDownloadUrl; | ||
|
||
cleanCargoSource = import ./cleanCargoSource.nix { | ||
inherit filterCargoSources internalCrateNameForCleanSource lib; | ||
}; | ||
cleanCargoToml = import ./cleanCargoToml.nix { }; | ||
|
||
crateNameFromCargoToml = import ./crateNameFromCargoToml.nix { | ||
inherit internalCrateNameFromCargoToml lib; | ||
}; | ||
|
||
findCargoFiles = import ./findCargoFiles.nix { inherit lib; }; | ||
|
||
path = import ./path.nix { | ||
inherit internalCrateNameForCleanSource lib; | ||
}; | ||
|
||
registryFromGitIndex = import ./registryFromGitIndex.nix { inherit registryFromDownloadUrl; }; | ||
registryFromSparse = import ./registryFromSparse.nix { inherit registryFromDownloadUrl lib; }; | ||
}; | ||
in | ||
lib.warnIf isUnsupported msg pureLib |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters