nix: clean up devShells
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
24618ab9a1
commit
7b554234b2
76
flake.nix
76
flake.nix
@ -115,7 +115,40 @@
|
|||||||
};
|
};
|
||||||
fsu = pkgs.callPackage ./cmd/fsu/package.nix { inherit (self.packages.${system}) fortify; };
|
fsu = pkgs.callPackage ./cmd/fsu/package.nix { inherit (self.packages.${system}) fortify; };
|
||||||
|
|
||||||
dist = pkgs.runCommand "${fortify.name}-dist" { inherit (self.devShells.${system}.default) buildInputs; } ''
|
dist =
|
||||||
|
pkgs.runCommand "${fortify.name}-dist"
|
||||||
|
{
|
||||||
|
buildInputs =
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
go
|
||||||
|
gcc
|
||||||
|
]
|
||||||
|
# buildInputs
|
||||||
|
++ (
|
||||||
|
with pkgsStatic;
|
||||||
|
[
|
||||||
|
musl
|
||||||
|
libffi
|
||||||
|
libseccomp
|
||||||
|
acl
|
||||||
|
wayland
|
||||||
|
wayland-protocols
|
||||||
|
]
|
||||||
|
++ (with xorg; [
|
||||||
|
libxcb
|
||||||
|
libXau
|
||||||
|
libXdmcp
|
||||||
|
])
|
||||||
|
)
|
||||||
|
# nativeBuildInputs
|
||||||
|
++ [
|
||||||
|
pkg-config
|
||||||
|
wayland-scanner
|
||||||
|
makeBinaryWrapper
|
||||||
|
];
|
||||||
|
}
|
||||||
|
''
|
||||||
# go requires XDG_CACHE_HOME for the build cache
|
# go requires XDG_CACHE_HOME for the build cache
|
||||||
export XDG_CACHE_HOME="$(mktemp -d)"
|
export XDG_CACHE_HOME="$(mktemp -d)"
|
||||||
|
|
||||||
@ -174,47 +207,12 @@
|
|||||||
pkgs = nixpkgsFor.${system};
|
pkgs = nixpkgsFor.${system};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell { inherit (fortify) buildInputs; };
|
||||||
buildInputs =
|
withPackage = pkgs.mkShell { buildInputs = [ fortify ] ++ fortify.buildInputs; };
|
||||||
with pkgs;
|
|
||||||
[
|
|
||||||
go
|
|
||||||
gcc
|
|
||||||
]
|
|
||||||
# buildInputs
|
|
||||||
++ (
|
|
||||||
with pkgsStatic;
|
|
||||||
[
|
|
||||||
musl
|
|
||||||
libffi
|
|
||||||
libseccomp
|
|
||||||
acl
|
|
||||||
wayland
|
|
||||||
wayland-protocols
|
|
||||||
]
|
|
||||||
++ (with xorg; [
|
|
||||||
libxcb
|
|
||||||
libXau
|
|
||||||
libXdmcp
|
|
||||||
])
|
|
||||||
)
|
|
||||||
# nativeBuildInputs
|
|
||||||
++ [
|
|
||||||
pkg-config
|
|
||||||
wayland-scanner
|
|
||||||
makeBinaryWrapper
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
fhs = fhs.env;
|
fhs = fhs.env;
|
||||||
|
|
||||||
withPackage = nixpkgsFor.${system}.mkShell {
|
|
||||||
buildInputs = [ self.packages.${system}.fortify ] ++ self.devShells.${system}.default.buildInputs;
|
|
||||||
};
|
|
||||||
|
|
||||||
generateDoc =
|
generateDoc =
|
||||||
let
|
let
|
||||||
pkgs = nixpkgsFor.${system};
|
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
doc =
|
doc =
|
||||||
@ -233,7 +231,7 @@
|
|||||||
sed -i '/*Declared by:*/,+1 d' $out
|
sed -i '/*Declared by:*/,+1 d' $out
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
nixpkgsFor.${system}.mkShell {
|
pkgs.mkShell {
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
exec cat ${docText} > options.md
|
exec cat ${docText} > options.md
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user