[Nix-dev] [patch] building cdrtools?

Marc Weber marco-oweber at gmx.de
Sat Nov 15 17:52:04 CET 2008


I've had trouble building cdrtools because chown and chgrp has been run
with the installation with boguous arguments..

This patch does fix it. Shall I commit it or do you have a better way?

diff --git a/pkgs/applications/misc/cdrtools/default.nix
b/pkgs/applications/misc/cdrtools/default.nix
index 17147c5..271ed1a 100644
--- a/pkgs/applications/misc/cdrtools/default.nix
+++ b/pkgs/applications/misc/cdrtools/default.nix
@@ -3,6 +3,15 @@
 stdenv.mkDerivation {
   name = "cdrtools-2.01";
   builder = ./builder.sh;
+  #hack, I'm getting "chown: invalid user: `bin" error, so replace
chown by a nop dummy script
+  preInstall = ''
+    mkdir "$TMP/bin"
+    for i in chown chgrp; do
+      echo '#!/bin/sh' >> "$TMP/bin/$i"
+      chmod +x "$TMP/bin/$i"
+      PATH="$TMP/bin:$PATH"
+    done
+  '';
   src = fetchurl {
     url = ftp://ftp.berlios.de/pub/cdrecord/cdrtools-2.01.tar.bz2;
     md5 = "d44a81460e97ae02931c31188fe8d3fd";

Marc



More information about the nix-dev mailing list