mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
disko: fix packaging missing nix files
This commit is contained in:
parent
b3875afc1f
commit
50adcfe303
1 changed files with 3 additions and 15 deletions
18
package.nix
18
package.nix
|
@ -1,27 +1,15 @@
|
|||
{ 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"
|
||||
];
|
||||
src = ./.;
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/disko
|
||||
cp -r $src/* $out/share/disko
|
||||
cp -r cli.nix default.nix types.nix disk-deactivate types $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
|
||||
disko > $out/bin/disko
|
||||
chmod 755 $out/bin/disko
|
||||
'';
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue