diff options
author | Lassulus <github@lassul.us> | 2022-12-09 14:45:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-09 14:45:51 +0100 |
commit | 12cda2489936794f8541c7fc530f9aadcac6d4ea (patch) | |
tree | 179790af97cb58b8a18540fb3f61082e6482ce2d /package.nix | |
parent | 66add2cd9edab96f5e87477229772bf2b3ca513a (diff) | |
parent | 17d17217d81c66d9e3fe5cd72155088c99f35155 (diff) |
Merge pull request #74 from nix-community/other-archs
Diffstat (limited to 'package.nix')
-rw-r--r-- | package.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/package.nix b/package.nix new file mode 100644 index 0000000..6e63310 --- /dev/null +++ b/package.nix @@ -0,0 +1,34 @@ +{ stdenvNoCC, lib }: + +let + inclFiles = {src, name}: files: lib.cleanSourceWith { + inherit src name; + filter = _path: _type: _type == "regular" && lib.any (file: builtins.baseNameOf _path == file) files; + }; +in +stdenvNoCC.mkDerivation rec { + name = "disko"; + src = inclFiles { inherit name; src = ./.; } [ + "disko" + "cli.nix" + "default.nix" + "types.nix" + "options.nix" + ]; + installPhase = '' + mkdir -p $out/bin $out/share/disko + cp -r $src/* $out/share/disko + sed \ + -e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" \ + -e "s|#!/usr/bin/env.*|#!/usr/bin/env bash|" \ + $src/disko > $out/bin/disko + chmod 755 $out/bin/disko + ''; + meta = with lib; { + description = "Format disks with nix-config"; + homepage = "https://github.com/nix-community/disko"; + license = licenses.mit; + maintainers = with maintainers; [ lassulus ]; + platforms = platforms.linux; + }; +} |