diff options
| author | Martin Fischer <martin@push-f.com> | 2026-10-04 11:12:01 +0200 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2026-10-10 19:54:55 +0200 |
| commit | b43108d65fd97ad1c0b3721818388ccee01b52ae (patch) | |
| tree | 99766ed5a79c90612a50b3b689ed7c773c45f540 | |
| parent | d0911253bd682f6e4ecf6b4178147220323c6d98 (diff) | |
feat(workstation): add nie
| -rw-r--r-- | nixos/npins/sources.json | 17 | ||||
| -rw-r--r-- | nixos/profiles/workstation/default.nix | 1 | ||||
| -rw-r--r-- | nixos/profiles/workstation/pkgs/nie.nix | 39 |
3 files changed, 57 insertions, 0 deletions
diff --git a/nixos/npins/sources.json b/nixos/npins/sources.json index 070f08f..e5473e2 100644 --- a/nixos/npins/sources.json +++ b/nixos/npins/sources.json @@ -132,6 +132,23 @@ "url": null, "hash": "sha256-SE3r9I5F4hBJbQxY0wHfd4l+4Wf6xXC9jXSeJrjjAHU=" }, + "nie": { + "type": "GitRelease", + "repository": { + "type": "Forgejo", + "server": "https://codeberg.org/", + "owner": "jzbor", + "repo": "nie" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "v0.1.3", + "revision": "3b3d6e061da1ea90412539bb18aaef8bca234ef3", + "url": "https://codeberg.org/api/v1/repos/jzbor/nie/archive/v0.1.3.tar.gz", + "hash": "sha256-HVuRSM5hle/tu45PnGldHH9bvzoZYxrVNXToGfYiwEE=" + }, "nixos": { "type": "Channel", "name": "nixos-26.05", diff --git a/nixos/profiles/workstation/default.nix b/nixos/profiles/workstation/default.nix index 077e459..cce6349 100644 --- a/nixos/profiles/workstation/default.nix +++ b/nixos/profiles/workstation/default.nix @@ -74,6 +74,7 @@ in environment.systemPackages = with pkgs; [ npins (callPackage ((sources.agenix { inherit pkgs; }) + "/pkgs/agenix.nix") {}) + (callPackage ./pkgs/nie.nix {}) (callPackage (sources.my-vdf { inherit pkgs; }) {}) nixfmt diff --git a/nixos/profiles/workstation/pkgs/nie.nix b/nixos/profiles/workstation/pkgs/nie.nix new file mode 100644 index 0000000..9031f65 --- /dev/null +++ b/nixos/profiles/workstation/pkgs/nie.nix @@ -0,0 +1,39 @@ +# TODO: submit nie to nixpkgs? +{ lib +, pkgs +, rustPlatform +, makeWrapper +, installShellFiles +, nix +}: + +let + sources = import <top/npins>; + src = sources.nie { inherit pkgs; }; +in +rustPlatform.buildRustPackage { + pname = "nie"; + version = sources.nie.version; + + inherit src; + + cargoLock.lockFile = src + "/Cargo.lock"; + + nativeBuildInputs = [ + makeWrapper + installShellFiles + ]; + + postInstall = '' + mkdir ./manpages ./completions + $out/bin/nie man ./manpages + $out/bin/nie completions ./completions + installManPage ./manpages/* + installShellCompletion completions/nie.{bash,fish,zsh} + ''; + + postFixup = '' + wrapProgram $out/bin/nie \ + --prefix PATH : ${lib.makeBinPath [ nix ]} + ''; +} |
