summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2024-06-28 15:12:33 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2024-06-28 15:12:33 -0300
commitdda2d7672ee3168fc13514485213ae1bde30e7d0 (patch)
tree01a3eccc9ac40c4cee840fe3b6de5ce90a67a292 /pkgs
parent51e0ef8568a9b07bde43ec0e477435215d2ddca9 (diff)
arcan: refactor
- hammer-reorder - replace-fail - strictDeps - split outputs
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/by-name/ar/arcan/package.nix40
1 files changed, 22 insertions, 18 deletions
diff --git a/pkgs/by-name/ar/arcan/package.nix b/pkgs/by-name/ar/arcan/package.nix
index e7c7180b8d8d..d3eeec5c5838 100644
--- a/pkgs/by-name/ar/arcan/package.nix
+++ b/pkgs/by-name/ar/arcan/package.nix
@@ -105,6 +105,25 @@ stdenv.mkDerivation (finalAttrs: {
xz
] ++ lib.optionals useEspeak [ espeak-ng ];
+ cmakeFlags = [
+ # The upstream project recommends tagging the distribution
+ (lib.cmakeFeature "DISTR_TAG" "Nixpkgs")
+ (lib.cmakeFeature "ENGINE_BUILDTAG" finalAttrs.src.rev)
+ (lib.cmakeFeature "BUILD_PRESET" "everything")
+ (lib.cmakeBool "BUILTIN_LUA" useBuiltinLua)
+ (lib.cmakeBool "DISABLE_JIT" useBuiltinLua)
+ (lib.cmakeBool "STATIC_LIBUVC" useStaticLibuvc)
+ (lib.cmakeBool "STATIC_SQLite3" useStaticSqlite)
+ (lib.cmakeBool "ENABLE_TRACY" useTracy)
+ "../src"
+ ];
+
+ outputs = [ "out" "dev" "lib" "man" ];
+
+ hardeningDisable = [ "format" ];
+
+ strictDeps = true;
+
# Emulate external/git/clone.sh
postUnpack =
let
@@ -134,10 +153,10 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
substituteInPlace ./src/platform/posix/paths.c \
- --replace "/usr/bin" "$out/bin" \
- --replace "/usr/share" "$out/share"
+ --replace-fail "/usr/bin" "$out/bin" \
+ --replace-fail "/usr/share" "$out/share"
substituteInPlace ./src/CMakeLists.txt \
- --replace "SETUID" "# SETUID"
+ --replace-fail "SETUID" "# SETUID"
'';
# INFO: Arcan build scripts require the manpages to be generated *before* the
@@ -148,21 +167,6 @@ stdenv.mkDerivation (finalAttrs: {
popd
'';
- cmakeFlags = [
- # The upstream project recommends tagging the distribution
- (lib.cmakeFeature "DISTR_TAG" "Nixpkgs")
- (lib.cmakeFeature "ENGINE_BUILDTAG" finalAttrs.src.rev)
- (lib.cmakeFeature "BUILD_PRESET" "everything")
- (lib.cmakeBool "BUILTIN_LUA" useBuiltinLua)
- (lib.cmakeBool "DISABLE_JIT" useBuiltinLua)
- (lib.cmakeBool "STATIC_LIBUVC" useStaticLibuvc)
- (lib.cmakeBool "STATIC_SQLite3" useStaticSqlite)
- (lib.cmakeBool "ENABLE_TRACY" useTracy)
- "../src"
- ];
-
- hardeningDisable = [ "format" ];
-
passthru = {
inherit sources;
wrapper = callPackage ./wrapper.nix { };