forked from NixOS/nixpkgs
-
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.
nix-store-veritysetup-generator: init at 0.1.0 (NixOS#343288)
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
pkgs/by-name/ni/nix-store-veritysetup-generator/package.nix
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, | ||
rustPlatform, | ||
fetchFromGitHub, | ||
systemd, | ||
}: | ||
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "nix-store-veritysetup-generator"; | ||
version = "0.1.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "nikstur"; | ||
repo = "nix-store-veritysetup-generator"; | ||
rev = version; | ||
hash = "sha256-kQ+mFBnvxmEH2+z1sDaehGInEsBpfZu8LMAseGjZ3/I="; | ||
}; | ||
|
||
sourceRoot = "${src.name}/rust"; | ||
|
||
cargoHash = "sha256-NCxPLsBJX4Dp8LcWrjVrocqDBvWc587DF3WPXZg1uFY="; | ||
|
||
env = { | ||
SYSTEMD_VERITYSETUP_PATH = "${systemd}/lib/systemd/systemd-veritysetup"; | ||
SYSTEMD_ESCAPE_PATH = "${systemd}/bin/systemd-escape"; | ||
}; | ||
|
||
# Use a fake path in tests so that they are not dependent on specific Nix | ||
# Store paths and thus don't break on different Nixpkgs invocations. This is | ||
# relevant so that this package can be compiled on different architectures. | ||
preCheck = '' | ||
export SYSTEMD_VERITYSETUP_PATH="systemd-veritysetup"; | ||
''; | ||
|
||
stripAllList = [ "bin" ]; | ||
|
||
meta = with lib; { | ||
description = "Systemd unit generator for a verity protected Nix Store"; | ||
homepage = "https://github.com/nikstur/nix-store-veritysetup-generator"; | ||
license = licenses.mit; | ||
maintainers = with lib.maintainers; [ nikstur ]; | ||
}; | ||
} |