summary refs log tree commit diff
path: root/pkgs/tools/cd-dvd
diff options
context:
space:
mode:
authorMatthew "strager" Glazar <strager.nds@gmail.com>2023-04-08 17:52:21 -0700
committerMatthew "strager" Glazar <strager.nds@gmail.com>2023-04-08 17:53:41 -0700
commit48f8dbfef31e577678484ceeb40df0bfb1a243dc (patch)
tree54a8f55b698922c59f2cfb659ed1564b7a1e7d09 /pkgs/tools/cd-dvd
parent00ae7d13b82ae7a6827eeab42b29589e556181fc (diff)
downloadnixpkgs-48f8dbfef31e577678484ceeb40df0bfb1a243dc.tar
nixpkgs-48f8dbfef31e577678484ceeb40df0bfb1a243dc.tar.gz
nixpkgs-48f8dbfef31e577678484ceeb40df0bfb1a243dc.tar.bz2
nixpkgs-48f8dbfef31e577678484ceeb40df0bfb1a243dc.tar.lz
nixpkgs-48f8dbfef31e577678484ceeb40df0bfb1a243dc.tar.xz
nixpkgs-48f8dbfef31e577678484ceeb40df0bfb1a243dc.tar.zst
nixpkgs-48f8dbfef31e577678484ceeb40df0bfb1a243dc.zip
nrg2iso: compile on Darwin
nrg2iso's build scripts are hard-coded to use GCC. This prevents nrg2iso
from working on Darwin/macOS.

Teach nrg2iso's build scripts to use whatever compiler is installed, not
GCC specifically. This allows nrg2iso to build using Clang on macOS.
Diffstat (limited to 'pkgs/tools/cd-dvd')
-rw-r--r--pkgs/tools/cd-dvd/nrg2iso/c-compiler.patch11
-rw-r--r--pkgs/tools/cd-dvd/nrg2iso/default.nix4
2 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/tools/cd-dvd/nrg2iso/c-compiler.patch b/pkgs/tools/cd-dvd/nrg2iso/c-compiler.patch
new file mode 100644
index 00000000000..72752723470
--- /dev/null
+++ b/pkgs/tools/cd-dvd/nrg2iso/c-compiler.patch
@@ -0,0 +1,11 @@
+Support building with compilers such as Clang.
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+ all: nrg2iso.c
+-	gcc nrg2iso.c -o nrg2iso
++	cc nrg2iso.c -o nrg2iso
+
+ clean:
+ 	rm -f nrg2iso
diff --git a/pkgs/tools/cd-dvd/nrg2iso/default.nix b/pkgs/tools/cd-dvd/nrg2iso/default.nix
index c0f74b8cddc..fdde54b596f 100644
--- a/pkgs/tools/cd-dvd/nrg2iso/default.nix
+++ b/pkgs/tools/cd-dvd/nrg2iso/default.nix
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-O+NqQWdY/BkQRztJqNrfKiqj1R8ZdhlzNrwXS8HjBuU=";
   };
 
+  patches = [ ./c-compiler.patch ];
+
   installPhase = ''
     mkdir -pv $out/bin/
     cp -v nrg2iso $out/bin/nrg2iso
@@ -18,6 +20,6 @@ stdenv.mkDerivation rec {
     description = "A linux utils for converting CD (or DVD) image generated by Nero Burning Rom to ISO format";
     homepage = "http://gregory.kokanosky.free.fr/v4/linux/nrg2iso.en.html";
     license = licenses.gpl2;
-    platforms = platforms.linux;
+    platforms = platforms.all;
   };
 }