nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 libxcrypt,
6 nixosTests,
7 nix-update-script,
8}:
9
10rustPlatform.buildRustPackage rec {
11 pname = "userborn";
12 version = "0.4.0";
13
14 src = fetchFromGitHub {
15 owner = "nikstur";
16 repo = "userborn";
17 rev = version;
18 hash = "sha256-Zh2u7we/MAIM7varuJA4AmEWeSMuA/C+0NSIUJN7zTs=";
19 };
20
21 sourceRoot = "${src.name}/rust/userborn";
22
23 cargoHash = "sha256-oLw/I8PEv75tz+KxbIJrwl8Wr0I/RzDh1SDZ6mRQpL8=";
24
25 nativeBuildInputs = [ rustPlatform.bindgenHook ];
26
27 buildInputs = [ libxcrypt ];
28
29 stripAllList = [ "bin" ];
30
31 passthru = {
32 updateScript = nix-update-script { };
33 tests = {
34 inherit (nixosTests)
35 userborn
36 userborn-mutable-users
37 userborn-mutable-etc
38 userborn-immutable-users
39 userborn-immutable-etc
40 userborn-static
41 ;
42 };
43 };
44
45 meta = {
46 homepage = "https://github.com/nikstur/userborn";
47 description = "Declaratively bear (manage) Linux users and groups";
48 changelog = "https://github.com/nikstur/userborn/blob/${version}/CHANGELOG.md";
49 license = lib.licenses.mit;
50 platforms = lib.platforms.unix;
51 maintainers = with lib.maintainers; [ nikstur ];
52 mainProgram = "userborn";
53 };
54}