nix: wrap fpkg
This is usable on nixos now due to the static build. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
4fa38d6063
commit
c21a4cff14
@ -103,7 +103,14 @@
|
|||||||
{
|
{
|
||||||
default = fortify;
|
default = fortify;
|
||||||
fortify = pkgs.pkgsStatic.callPackage ./package.nix {
|
fortify = pkgs.pkgsStatic.callPackage ./package.nix {
|
||||||
inherit (pkgs) bubblewrap xdg-dbus-proxy glibc;
|
inherit (pkgs)
|
||||||
|
bubblewrap
|
||||||
|
xdg-dbus-proxy
|
||||||
|
glibc
|
||||||
|
zstd
|
||||||
|
gnutar
|
||||||
|
coreutils
|
||||||
|
;
|
||||||
};
|
};
|
||||||
fsu = pkgs.callPackage ./cmd/fsu/package.nix { inherit (self.packages.${system}) fortify; };
|
fsu = pkgs.callPackage ./cmd/fsu/package.nix { inherit (self.packages.${system}) fortify; };
|
||||||
|
|
||||||
|
@ -3,7 +3,14 @@
|
|||||||
let
|
let
|
||||||
inherit (lib) types mkOption mkEnableOption;
|
inherit (lib) types mkOption mkEnableOption;
|
||||||
fortify = pkgs.pkgsStatic.callPackage ./package.nix {
|
fortify = pkgs.pkgsStatic.callPackage ./package.nix {
|
||||||
inherit (pkgs) bubblewrap xdg-dbus-proxy glibc;
|
inherit (pkgs)
|
||||||
|
bubblewrap
|
||||||
|
xdg-dbus-proxy
|
||||||
|
glibc
|
||||||
|
zstd
|
||||||
|
gnutar
|
||||||
|
coreutils
|
||||||
|
;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
|
45
package.nix
45
package.nix
@ -14,6 +14,11 @@
|
|||||||
wayland-scanner,
|
wayland-scanner,
|
||||||
xorg,
|
xorg,
|
||||||
|
|
||||||
|
# for fpkg
|
||||||
|
zstd,
|
||||||
|
gnutar,
|
||||||
|
coreutils,
|
||||||
|
|
||||||
glibc, # for ldd
|
glibc, # for ldd
|
||||||
withStatic ? stdenv.hostPlatform.isStatic,
|
withStatic ? stdenv.hostPlatform.isStatic,
|
||||||
}:
|
}:
|
||||||
@ -80,19 +85,33 @@ buildGoModule rec {
|
|||||||
HOME="$(mktemp -d)" PATH="${pkg-config}/bin:$PATH" go generate ./...
|
HOME="$(mktemp -d)" PATH="${pkg-config}/bin:$PATH" go generate ./...
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall =
|
||||||
install -D --target-directory=$out/share/zsh/site-functions comp/*
|
let
|
||||||
|
appPackages = [
|
||||||
|
glibc
|
||||||
|
bubblewrap
|
||||||
|
xdg-dbus-proxy
|
||||||
|
];
|
||||||
|
in
|
||||||
|
''
|
||||||
|
install -D --target-directory=$out/share/zsh/site-functions comp/*
|
||||||
|
|
||||||
mkdir "$out/libexec"
|
mkdir "$out/libexec"
|
||||||
mv "$out"/bin/* "$out/libexec/"
|
mv "$out"/bin/* "$out/libexec/"
|
||||||
|
|
||||||
makeBinaryWrapper "$out/libexec/fortify" "$out/bin/fortify" \
|
makeBinaryWrapper "$out/libexec/fortify" "$out/bin/fortify" \
|
||||||
--inherit-argv0 --prefix PATH : ${
|
--inherit-argv0 --prefix PATH : ${lib.makeBinPath appPackages}
|
||||||
lib.makeBinPath [
|
|
||||||
glibc
|
makeBinaryWrapper "$out/libexec/fpkg" "$out/bin/fpkg" \
|
||||||
bubblewrap
|
--inherit-argv0 --prefix PATH : ${
|
||||||
xdg-dbus-proxy
|
lib.makeBinPath (
|
||||||
]
|
appPackages
|
||||||
}
|
++ [
|
||||||
'';
|
zstd
|
||||||
|
gnutar
|
||||||
|
coreutils
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user