nixpkgs/pkgs/by-name/us/userborn/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.3 KiB
Nix
Raw Normal View History

2024-08-05 14:34:56 +00:00
{
lib,
rustPlatform,
fetchFromGitHub,
makeBinaryWrapper,
mkpasswd,
nixosTests,
2024-09-04 08:14:40 +00:00
nix-update-script,
2024-08-05 14:34:56 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "userborn";
2024-09-10 15:26:39 +00:00
version = "0.2.0";
2024-08-05 14:34:56 +00:00
src = fetchFromGitHub {
owner = "nikstur";
repo = "userborn";
rev = version;
2024-09-10 15:26:39 +00:00
hash = "sha256-LEKdgmw1inBOi0sriG8laCrtx0ycqR5ftdnmszadx3U=";
2024-08-05 14:34:56 +00:00
};
sourceRoot = "${src.name}/rust/userborn";
2024-09-10 15:26:39 +00:00
cargoHash = "sha256-Pjzu6db2WomNsC+jNK1fr1u7koZwUvWPIY5JHMo1gkA=";
2024-08-05 14:34:56 +00:00
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [ mkpasswd ];
nativeCheckInputs = [ mkpasswd ];
postInstall = ''
wrapProgram $out/bin/userborn --prefix PATH : ${lib.makeBinPath [ mkpasswd ]}
'';
stripAllList = [ "bin" ];
passthru = {
2024-09-04 08:14:40 +00:00
updateScript = nix-update-script { };
tests = {
inherit (nixosTests)
userborn
userborn-mutable-users
userborn-mutable-etc
userborn-immutable-users
userborn-immutable-etc
;
};
};
2024-08-05 14:34:56 +00:00
meta = with lib; {
homepage = "https://github.com/nikstur/userborn";
description = "Declaratively bear (manage) Linux users and groups";
license = licenses.mit;
2024-09-10 15:29:35 +00:00
platforms = platforms.linux;
2024-08-05 14:34:56 +00:00
maintainers = with lib.maintainers; [ nikstur ];
mainProgram = "userborn";
};
}