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-08 07:20:09 +0200 |
| commit | 20791eaa24d1d42dde6e90743491316b03791c6f (patch) | |
| tree | f3c323b213b5de24a23b37a354eaf63b63d1ec6e | |
| parent | a8a1d91d765f353c07b6ea86f67d2f6b4087aafd (diff) | |
| -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 8a2146b..0a018b7 100644 --- a/nixos/profiles/workstation/default.nix +++ b/nixos/profiles/workstation/default.nix @@ -72,6 +72,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 ]} + ''; +} |
