From 9801fb6c1a0ae7e325443ff2fb0c61700865fbf3 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 12 Apr 2022 00:56:28 -0300 Subject: [PATCH 1/2] move muon to muonlang In order to avoid clashing the (future) muon (a meson replacement). --- pkgs/development/compilers/{muon => muonlang}/default.nix | 0 pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/development/compilers/{muon => muonlang}/default.nix (100%) diff --git a/pkgs/development/compilers/muon/default.nix b/pkgs/development/compilers/muonlang/default.nix similarity index 100% rename from pkgs/development/compilers/muon/default.nix rename to pkgs/development/compilers/muonlang/default.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f7a0b0a21dfa..94c747e3e65b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13111,7 +13111,7 @@ with pkgs; mozart2-binary = callPackage ../development/compilers/mozart/binary.nix { }; - muon = callPackage ../development/compilers/muon { }; + muonlang = callPackage ../development/compilers/muonlang { }; inherit (callPackages ../development/compilers/nim { }) nim-unwrapped nimble-unwrapped nim; From 7eb6efcb4e40f6f30a701f660ee4afad917ca6c5 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 12 Apr 2022 21:31:42 -0300 Subject: [PATCH 2/2] samurai: rewrite --- .../tools/build-managers/samurai/default.nix | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/build-managers/samurai/default.nix b/pkgs/development/tools/build-managers/samurai/default.nix index cd058bfc2632..b13762d63b16 100644 --- a/pkgs/development/tools/build-managers/samurai/default.nix +++ b/pkgs/development/tools/build-managers/samurai/default.nix @@ -1,4 +1,8 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch }: +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +}: stdenv.mkDerivation rec { pname = "samurai"; @@ -8,17 +12,21 @@ stdenv.mkDerivation rec { owner = "michaelforney"; repo = pname; rev = version; - sha256 = "sha256-RPY3MFlnSDBZ5LOkdWnMiR/CZIBdqIFo9uLU+SAKPBI="; + hash = "sha256-RPY3MFlnSDBZ5LOkdWnMiR/CZIBdqIFo9uLU+SAKPBI="; }; makeFlags = [ "DESTDIR=" "PREFIX=${placeholder "out"}" ]; patches = [ + # NULL pointer dereference in writefile() in util.c; remove this at the next + # release (fetchpatch { name = "CVE-2021-30218.patch"; url = "https://github.com/michaelforney/samurai/commit/e84b6d99c85043fa1ba54851ee500540ec206918.patch"; sha256 = "sha256-hyndwj6st4rwOJ35Iu0qL12dR5E6CBvsulvR27PYKMw="; }) + # NULL pointer dereference in printstatus() in build.c; remove this at the + # next release (fetchpatch { name = "CVE-2021-30219.patch"; url = "https://github.com/michaelforney/samurai/commit/d2af3bc375e2a77139c3a28d6128c60cd8d08655.patch"; @@ -27,10 +35,24 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - description = "ninja-compatible build tool written in C"; homepage = "https://github.com/michaelforney/samurai"; + description = "ninja-compatible build tool written in C"; + longDescription = '' + samurai is a ninja-compatible build tool with a focus on simplicity, + speed, and portability. + + It is written in C99, requires various POSIX.1-2008 interfaces, and + nowadays implements ninja build language through version 1.9.0 except for + Microsoft (R) Visual C++ (TM) dependency handling (deps = msvc). + + It is feature-complete (but not bug-compatible) and supports most of the + same options as ninja, using the same format for .ninja_log and + .ninja_deps as the original ninja tool, currently version 5 and 4 + respectively. + ''; license = with licenses; [ mit asl20 ]; # see LICENSE - maintainers = with maintainers; [ dtzWill ]; + maintainers = with maintainers; [ dtzWill AndersonTorres ]; + platforms = platforms.all; }; }