summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/wa/waf/hook.nix
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2024-02-08 22:06:02 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2024-02-08 22:06:02 -0300
commit907238ae517879c7eade60cc3fb5824b088b643b (patch)
treeb58508e50e10d04fc7aee297582702f8b86b3490 /pkgs/by-name/wa/waf/hook.nix
parentad2200abfe4e863c775b5d5df746d5dfb0b30a54 (diff)
waf: remove vrthra from maintainers
Also, migrate it to by-name hierarchy.
Diffstat (limited to 'pkgs/by-name/wa/waf/hook.nix')
-rw-r--r--pkgs/by-name/wa/waf/hook.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/by-name/wa/waf/hook.nix b/pkgs/by-name/wa/waf/hook.nix
new file mode 100644
index 000000000000..ac497d227831
--- /dev/null
+++ b/pkgs/by-name/wa/waf/hook.nix
@@ -0,0 +1,24 @@
+{ lib
+, stdenv
+, pkgs
+, makeSetupHook
+, waf
+}:
+
+makeSetupHook {
+ name = "waf-setup-hook";
+
+ substitutions = {
+ # Sometimes the upstream provides its own waf file; in order to honor it,
+ # waf is not inserted into propagatedBuildInputs, rather it is inserted
+ # directly
+ inherit waf;
+ wafCrossFlags = lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system)
+ ''--cross-compile "--cross-execute=${stdenv.targetPlatform.emulator pkgs}"'';
+ };
+
+ meta = {
+ description = "A setup hook for using Waf in Nixpkgs";
+ inherit (waf.meta) maintainers platforms broken;
+ };
+} ./setup-hook.sh