summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-03-12 15:18:25 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-03-12 18:55:41 -0400
commitb152dcf852ecef3e30a632f0050abb30a26e1dfd (patch)
treee5b496682cdc5a81b4f8595e2cc1dd12651014ba
parentc208ca638763ad7c0e5f4cc2e35016fff8ca1676 (diff)
downloadnixpkgs-b152dcf852ecef3e30a632f0050abb30a26e1dfd.tar
nixpkgs-b152dcf852ecef3e30a632f0050abb30a26e1dfd.tar.gz
nixpkgs-b152dcf852ecef3e30a632f0050abb30a26e1dfd.tar.bz2
nixpkgs-b152dcf852ecef3e30a632f0050abb30a26e1dfd.tar.lz
nixpkgs-b152dcf852ecef3e30a632f0050abb30a26e1dfd.tar.xz
nixpkgs-b152dcf852ecef3e30a632f0050abb30a26e1dfd.tar.zst
nixpkgs-b152dcf852ecef3e30a632f0050abb30a26e1dfd.zip
pharo: Tighten source and simplify meta.platforms
-rw-r--r--pkgs/development/pharo/vm/build-vm-legacy.nix8
-rw-r--r--pkgs/development/pharo/wrapper/default.nix14
2 files changed, 13 insertions, 9 deletions
diff --git a/pkgs/development/pharo/vm/build-vm-legacy.nix b/pkgs/development/pharo/vm/build-vm-legacy.nix
index 66cef77e5a9..f2fd6eebd56 100644
--- a/pkgs/development/pharo/vm/build-vm-legacy.nix
+++ b/pkgs/development/pharo/vm/build-vm-legacy.nix
@@ -70,9 +70,9 @@ stdenv.mkDerivation rec {
     license = stdenv.lib.licenses.mit;
     maintainers = [ stdenv.lib.maintainers.lukego ];
     # Pharo VM sources are packaged separately for darwin (OS X)
-    platforms = with stdenv.lib;
-                  intersectLists
-                    platforms.mesaPlatforms
-                    (subtractLists platforms.darwin platforms.unix);
+    platforms = stdenv.lib.filter
+      (system: with stdenv.lib.systems.elaborate { inherit system; };
+         isUnix && !isDarwin)
+      stdenv.lib.platforms.mesaPlatforms;
   };
 }
diff --git a/pkgs/development/pharo/wrapper/default.nix b/pkgs/development/pharo/wrapper/default.nix
index f60b8a6d203..084c46cd5b5 100644
--- a/pkgs/development/pharo/wrapper/default.nix
+++ b/pkgs/development/pharo/wrapper/default.nix
@@ -2,7 +2,7 @@
 
 stdenv.mkDerivation rec {
   name = "pharo";
-  src = ./.;
+  src = ./pharo-vm.sh;
   inherit cog32 spur32 spur64 file;
   magic = ./magic;
   desktopItem = makeDesktopItem {
@@ -17,6 +17,10 @@ stdenv.mkDerivation rec {
     categories = "Development;";
     mimeType = "application/x-pharo-image";
   };
+  unpackPhase = ''
+    cp $src ./pharo-vm.sh
+    sourceRoot=$PWD
+  '';
   buildPhase = ''
     substituteAllInPlace ./pharo-vm.sh
   '';
@@ -49,10 +53,10 @@ stdenv.mkDerivation rec {
     license = stdenv.lib.licenses.mit;
     maintainers = [ stdenv.lib.maintainers.lukego ];
     # Pharo VM sources are packaged separately for darwin (OS X)
-    platforms = with stdenv.lib;
-                  intersectLists
-                    platforms.mesaPlatforms
-                    (subtractLists platforms.darwin platforms.unix);
+    platforms = stdenv.lib.filter
+      (system: with stdenv.lib.systems.elaborate { inherit system; };
+         isUnix && !isDarwin)
+      stdenv.lib.platforms.mesaPlatforms;
   };
 }