mirror of
https://github.com/nix-community/disko.git
synced 2024-11-09 00:04:18 +03:00
disko: fix packaging missing nix files
This commit is contained in:
parent
b3875afc1f
commit
50adcfe303
18
package.nix
18
package.nix
@ -1,27 +1,15 @@
|
|||||||
{ stdenvNoCC, lib }:
|
{ 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 {
|
stdenvNoCC.mkDerivation rec {
|
||||||
name = "disko";
|
name = "disko";
|
||||||
src = inclFiles { inherit name; src = ./.; } [
|
src = ./.;
|
||||||
"disko"
|
|
||||||
"cli.nix"
|
|
||||||
"default.nix"
|
|
||||||
"types.nix"
|
|
||||||
"options.nix"
|
|
||||||
];
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/share/disko
|
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 \
|
sed \
|
||||||
-e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" \
|
-e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" \
|
||||||
-e "s|#!/usr/bin/env.*|#!/usr/bin/env bash|" \
|
-e "s|#!/usr/bin/env.*|#!/usr/bin/env bash|" \
|
||||||
$src/disko > $out/bin/disko
|
disko > $out/bin/disko
|
||||||
chmod 755 $out/bin/disko
|
chmod 755 $out/bin/disko
|
||||||
'';
|
'';
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user