summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/compilers/futhark/default.nix77
-rw-r--r--pkgs/development/compilers/futhark/unwrapped.nix55
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix1
-rw-r--r--pkgs/development/haskell-modules/configuration-nix.nix15
-rw-r--r--pkgs/tools/audio/mpdsync/default.nix24
-rw-r--r--pkgs/top-level/all-packages.nix2
6 files changed, 96 insertions, 78 deletions
diff --git a/pkgs/development/compilers/futhark/default.nix b/pkgs/development/compilers/futhark/default.nix
index 6cabd686b497..890be3431c3a 100644
--- a/pkgs/development/compilers/futhark/default.nix
+++ b/pkgs/development/compilers/futhark/default.nix
@@ -1,24 +1,55 @@
-{ callPackage, symlinkJoin, makeWrapper, stdenv, gcc, opencl-headers, opencl-icd }:
-
-let
-  unwrapped = callPackage ./unwrapped.nix {};
-
-  path = stdenv.lib.makeBinPath [ gcc ];
-
-  wrapped = symlinkJoin {
-    name = "futhark-wrapped";
-    buildInputs = [ makeWrapper ];
-    paths = [ unwrapped ];
-    postBuild = ''
-      wrapProgram $out/bin/futhark-c \
-        --prefix PATH : "${path}"
-
-      wrapProgram $out/bin/futhark-opencl \
-        --prefix PATH : "${path}" \
-        --set NIX_CC_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST 1 \
-        --set NIX_CFLAGS_COMPILE "-I${opencl-headers}/include" \
-        --set NIX_CFLAGS_LINK "-L${opencl-icd}/lib"
-    '';
+# Generated using `cabal2nix --hpack .`, then replace src
+{ mkDerivation, alex, array, base, bifunctors, binary, blaze-html
+, bytestring, containers, data-binary-ieee754, directory
+, directory-tree, dlist, extra, file-embed, filepath, gitrev, happy
+, haskeline, hpack, HUnit, json, language-c-quote, mainland-pretty
+, markdown, mtl, neat-interpolation, parallel, parsec, process
+, process-extras, QuickCheck, random, raw-strings-qq, regex-tdfa
+, srcloc, stdenv, template-haskell, temporary, test-framework
+, test-framework-hunit, test-framework-quickcheck2, text
+, th-lift-instances, transformers, vector, vector-binary-instances
+, zlib, fetchFromGitHub
+}:
+mkDerivation {
+  pname = "futhark";
+  version = "0.6.2";
+  src = fetchFromGitHub {
+    owner = "diku-dk";
+    repo = "futhark";
+    rev = "v0.6.2";
+    sha256 = "0yj7n01swpvqblybdnks3mjf0mzf1gdg2b2cpxdpxnrjw5j0pnq2";
   };
-
-in wrapped
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    array base bifunctors binary blaze-html bytestring containers
+    data-binary-ieee754 directory directory-tree dlist extra file-embed
+    filepath gitrev language-c-quote mainland-pretty markdown mtl
+    neat-interpolation parallel parsec process raw-strings-qq
+    regex-tdfa srcloc template-haskell text th-lift-instances
+    transformers vector vector-binary-instances zlib
+  ];
+  libraryToolDepends = [ alex happy hpack ];
+  executableHaskellDepends = [
+    array base bifunctors binary blaze-html bytestring containers
+    data-binary-ieee754 directory directory-tree dlist extra file-embed
+    filepath gitrev haskeline json language-c-quote mainland-pretty
+    markdown mtl neat-interpolation parallel parsec process
+    process-extras random raw-strings-qq regex-tdfa srcloc
+    template-haskell temporary text th-lift-instances transformers
+    vector vector-binary-instances zlib
+  ];
+  testHaskellDepends = [
+    array base bifunctors binary blaze-html bytestring containers
+    data-binary-ieee754 directory directory-tree dlist extra file-embed
+    filepath gitrev HUnit language-c-quote mainland-pretty markdown mtl
+    neat-interpolation parallel parsec process QuickCheck
+    raw-strings-qq regex-tdfa srcloc template-haskell test-framework
+    test-framework-hunit test-framework-quickcheck2 text
+    th-lift-instances transformers vector vector-binary-instances zlib
+  ];
+  preConfigure = "hpack";
+  homepage = "https://futhark-lang.org";
+  description = "An optimising compiler for a functional, array-oriented language";
+  license = stdenv.lib.licenses.isc;
+}
diff --git a/pkgs/development/compilers/futhark/unwrapped.nix b/pkgs/development/compilers/futhark/unwrapped.nix
deleted file mode 100644
index 890be3431c3a..000000000000
--- a/pkgs/development/compilers/futhark/unwrapped.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-# Generated using `cabal2nix --hpack .`, then replace src
-{ mkDerivation, alex, array, base, bifunctors, binary, blaze-html
-, bytestring, containers, data-binary-ieee754, directory
-, directory-tree, dlist, extra, file-embed, filepath, gitrev, happy
-, haskeline, hpack, HUnit, json, language-c-quote, mainland-pretty
-, markdown, mtl, neat-interpolation, parallel, parsec, process
-, process-extras, QuickCheck, random, raw-strings-qq, regex-tdfa
-, srcloc, stdenv, template-haskell, temporary, test-framework
-, test-framework-hunit, test-framework-quickcheck2, text
-, th-lift-instances, transformers, vector, vector-binary-instances
-, zlib, fetchFromGitHub
-}:
-mkDerivation {
-  pname = "futhark";
-  version = "0.6.2";
-  src = fetchFromGitHub {
-    owner = "diku-dk";
-    repo = "futhark";
-    rev = "v0.6.2";
-    sha256 = "0yj7n01swpvqblybdnks3mjf0mzf1gdg2b2cpxdpxnrjw5j0pnq2";
-  };
-  isLibrary = true;
-  isExecutable = true;
-  libraryHaskellDepends = [
-    array base bifunctors binary blaze-html bytestring containers
-    data-binary-ieee754 directory directory-tree dlist extra file-embed
-    filepath gitrev language-c-quote mainland-pretty markdown mtl
-    neat-interpolation parallel parsec process raw-strings-qq
-    regex-tdfa srcloc template-haskell text th-lift-instances
-    transformers vector vector-binary-instances zlib
-  ];
-  libraryToolDepends = [ alex happy hpack ];
-  executableHaskellDepends = [
-    array base bifunctors binary blaze-html bytestring containers
-    data-binary-ieee754 directory directory-tree dlist extra file-embed
-    filepath gitrev haskeline json language-c-quote mainland-pretty
-    markdown mtl neat-interpolation parallel parsec process
-    process-extras random raw-strings-qq regex-tdfa srcloc
-    template-haskell temporary text th-lift-instances transformers
-    vector vector-binary-instances zlib
-  ];
-  testHaskellDepends = [
-    array base bifunctors binary blaze-html bytestring containers
-    data-binary-ieee754 directory directory-tree dlist extra file-embed
-    filepath gitrev HUnit language-c-quote mainland-pretty markdown mtl
-    neat-interpolation parallel parsec process QuickCheck
-    raw-strings-qq regex-tdfa srcloc template-haskell test-framework
-    test-framework-hunit test-framework-quickcheck2 text
-    th-lift-instances transformers vector vector-binary-instances zlib
-  ];
-  preConfigure = "hpack";
-  homepage = "https://futhark-lang.org";
-  description = "An optimising compiler for a functional, array-oriented language";
-  license = stdenv.lib.licenses.isc;
-}
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index 447e9cb42272..46e104e34724 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -707,6 +707,7 @@ self: super: {
   # vaultenv is not available from Hackage.
   vaultenv = self.callPackage ../tools/haskell/vaultenv { };
 
+  # futhark is not available from Hackage.
   futhark = self.callPackage ../compilers/futhark { };
 
   # https://github.com/Philonous/hs-stun/pull/1
diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix
index bb9b0e5d5fe6..523f4ed0212c 100644
--- a/pkgs/development/haskell-modules/configuration-nix.nix
+++ b/pkgs/development/haskell-modules/configuration-nix.nix
@@ -528,4 +528,19 @@ self: super: builtins.intersectAttrs super {
 
   # The test-suite requires a running PostgreSQL server.
   Frames-beam = dontCheck super.Frames-beam;
+
+  futhark = with pkgs;
+    let path = stdenv.lib.makeBinPath [ gcc ];
+    in overrideCabal (addBuildTool super.futhark makeWrapper) (_drv: {
+      postInstall = ''
+        wrapProgram $out/bin/futhark-c \
+          --prefix PATH : "${path}"
+
+        wrapProgram $out/bin/futhark-opencl \
+          --prefix PATH : "${path}" \
+          --set NIX_CC_WRAPPER_x86_64_unknown_linux_gnu_TARGET_HOST 1 \
+          --set NIX_CFLAGS_COMPILE "-I${opencl-headers}/include" \
+          --set NIX_CFLAGS_LINK "-L${opencl-icd}/lib"
+      '';
+    });
 }
diff --git a/pkgs/tools/audio/mpdsync/default.nix b/pkgs/tools/audio/mpdsync/default.nix
new file mode 100644
index 000000000000..51f5ba656168
--- /dev/null
+++ b/pkgs/tools/audio/mpdsync/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, python2, fetchFromGitHub }:
+with python2.pkgs;
+stdenv.mkDerivation {
+  name = "mpdsync-2017-06-15";
+
+  src = fetchFromGitHub {
+    owner = "alphapapa";
+    repo = "mpdsync";
+    rev = "da90058f44dd9578cc5f2fb96a1fb2b26da40d07";
+    sha256 = "1mfg3ipqj5dvyyqbgp6ia6sc1ja5gmm2c9mfrwx0jw2dl182if6q";
+  };
+
+  pythonPath = [ mpd2 ];
+
+  nativeBuildInputs = [
+    wrapPython
+  ];
+
+  dontBuild = true;
+
+  installPhase = "install -D mpdsync.py $out/bin/mpdsync";
+  postFixup = "wrapPythonPrograms";
+
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a31834b053a2..eb6e1505db9c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1336,6 +1336,8 @@ with pkgs;
 
   fsmark = callPackage ../tools/misc/fsmark { };
 
+  futhark = haskell.lib.justStaticExecutables haskellPackages.futhark;
+
   fwup = callPackage ../tools/misc/fwup { };
 
   fzf = callPackage ../tools/misc/fzf { };