summary refs log tree commit diff
path: root/pkgs/misc/gxemul
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2008-12-20 01:20:35 +0000
committerMarc Weber <marco-oweber@gmx.de>2008-12-20 01:20:35 +0000
commite996113be7f41f067aaefac881c540b5ceb8d2d4 (patch)
tree177f16552ca2d05020c3d45a0b45502556a09502 /pkgs/misc/gxemul
parent5ab6464edb9bbc2a9aa15122ffc02b57ad236bb7 (diff)
downloadnixlib-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar
nixlib-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.gz
nixlib-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.bz2
nixlib-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.lz
nixlib-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.xz
nixlib-e996113be7f41f067aaefac881c540b5ceb8d2d4.tar.zst
nixlib-e996113be7f41f067aaefac881c540b5ceb8d2d4.zip
removed mkDerivationByConfiguration, using composableDerivation instead
qgis, vim_configurable both work now

svn path=/nixpkgs/trunk/; revision=13661
Diffstat (limited to 'pkgs/misc/gxemul')
-rw-r--r--pkgs/misc/gxemul/default.nix55
1 files changed, 29 insertions, 26 deletions
diff --git a/pkgs/misc/gxemul/default.nix b/pkgs/misc/gxemul/default.nix
index e7d0c92a1c56..548aad3bc27a 100644
--- a/pkgs/misc/gxemul/default.nix
+++ b/pkgs/misc/gxemul/default.nix
@@ -1,34 +1,37 @@
-args: with args.lib; with args;
-let
-  name="gxemul-0.4.6";
-  co = chooseOptionsByFlags {
-    inherit args;
-    flagDescr = {
-      mandatory = { install = "ensureDir \$out/bin; cp gxemul \$out/bin;"; };
-      doc   = { install = "ensureDir \$out/share/${name}; cp -r doc \$out/share/${name};"; implies = "man"; };
-      demos = { install = "ensureDir \$out/share/${name}; cp -r demos \$out/share/${name};"; };
-      man   = { install = "cp -r ./man \$out/;";};
+args: with args;
+let edf = composableDerivation.edf;
+    name = "gxemul-0.4.6"; in
+composableDerivation.composableDerivation {
+
+  initial = {
+    inherit name;
+    flags = {
+        doc   = { installPhase = "ensureDir \$out/share/${name}; cp -r doc \$out/share/${name};"; implies = "man"; };
+        demos = { installPhase = "ensureDir \$out/share/${name}; cp -r demos \$out/share/${name};"; };
+        man   = { installPhase = "cp -r ./man \$out/;";};
     };
-    optionals = ["libX11"];
-    defaultFlags = [ "demos" "doc" ];
-  };
-in stdenv.mkDerivation {
 
-  inherit name;
-  inherit (co) /* flags */ buildInputs configureFlags;
+    cfg = {
+      docSupport = true;
+      demosSupport = true;
+      manSupport = true;
+    };
 
-  src = fetchurl {
-    url = http://gavare.se/gxemul/src/gxemul-0.4.6.tar.gz;
-    sha256 = "0hf3gi6hfd2qr5090zimfiddcjgank2q6m7dfsr81wwpxfbhb2z3";
-  };
+    installPhase = "ensureDir \$out/bin; cp gxemul \$out/bin;";
 
-  configurePhase="./configure";
+    src = fetchurl {
+      url = http://gavare.se/gxemul/src/gxemul-0.4.6.tar.gz;
+      sha256 = "0hf3gi6hfd2qr5090zimfiddcjgank2q6m7dfsr81wwpxfbhb2z3";
+    };
+
+    configurePhase="./configure";
 
-  installPhase = concatStrings ( catAttrs "install" co.flatOptions );
+    meta = {
+      license = "BSD";
+      description = "A Machine Emulator, Mainly emulates MIPS, but supports other CPU type";
+      homepage = http://gavare.se/gxemul/;
+    };
 
-  meta = {
-    license = "BSD";
-    description = "A Machine Emulator, Mainly emulates MIPS, but supports other CPU type";
-    homepage = http://gavare.se/gxemul/;
+    mergeAttrBy = { installPhase = a : b : "${a}\n${b}"; };
   };
 }