flake.nix: add freebsd cross compiled variant of package
This commit is contained in:
@@ -20,6 +20,12 @@
|
||||
in {
|
||||
default = self.packages.${system}.wamf;
|
||||
wamf = pkgs.callPackage ./nix/package.nix { inherit src; };
|
||||
wamf-freebsd-cross = let
|
||||
pkgs = import nixpkgs {
|
||||
localSystem = system;
|
||||
crossSystem = "x86_64-freebsd";
|
||||
};
|
||||
in pkgs.callPackage ./nix/package.nix { inherit src; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
src,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
let
|
||||
isFreebsdCross = !stdenv.buildPlatform.isFreeBSD && stdenv.hostPlatform.isFreeBSD;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "where-are-my-friends";
|
||||
version = "0.1.0";
|
||||
@@ -14,6 +16,13 @@ stdenv.mkDerivation {
|
||||
"CC=${stdenv.cc.targetPrefix}cc"
|
||||
];
|
||||
|
||||
postFixup = lib.optionalString isFreebsdCross ''
|
||||
patchelf --set-interpreter /usr/libexec/ld-elf.so.1 "$out/bin/wamf"
|
||||
patchelf --remove-rpath "$out/bin/wamf"
|
||||
'';
|
||||
|
||||
hardeningDisable = lib.optionals isFreebsdCross [ "fortify" ];
|
||||
|
||||
meta = {
|
||||
description = "RCON -> Bluemap player position API converter";
|
||||
homepage = "https://git.pvv.ntnu.no/Projects/where-are-my-friends";
|
||||
|
||||
Reference in New Issue
Block a user