Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

futhark: init at 0.6.2 #43865

Merged
merged 5 commits into from
Oct 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions pkgs/development/compilers/futhark/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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;
}
6 changes: 0 additions & 6 deletions pkgs/development/haskell-modules/configuration-common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,6 @@ self: super: {
then appendConfigureFlag super.gtk "-fhave-quartz-gtk"
else super.gtk;

# vaultenv is not available from Hackage.
vaultenv = self.callPackage ../tools/haskell/vaultenv { };

# https://github.com/Philonous/hs-stun/pull/1
# Remove if a version > 0.1.0.1 ever gets released.
stunclient = overrideCabal super.stunclient (drv: {
Expand Down Expand Up @@ -947,9 +944,6 @@ self: super: {
# Tries to read a file it is not allowed to in the test suite
load-env = dontCheck super.load-env;

# Add support for https://github.com/haskell-hvr/multi-ghc-travis.
multi-ghc-travis = self.callPackage ../tools/haskell/multi-ghc-travis {};

# https://github.com/yesodweb/Shelly.hs/issues/162
shelly = dontCheck super.shelly;

Expand Down
15 changes: 15 additions & 0 deletions pkgs/development/haskell-modules/configuration-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Copy link
Member Author

@infinisil infinisil Aug 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@basvandijk These wrappers don't seem to be applied like this, building either pkgs.futhark or pkgs.haskellPackages.futhark results in raw ELF binaries

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange, I did test if it created the correct wrappers but I can confirm it now results in ELF binaries. I'll look into it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should now be fixed by 2cdeee2 which I pushed to this PR.

@peti OK with this solution?

--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"
'';
});
}
5 changes: 4 additions & 1 deletion pkgs/development/haskell-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
, packageSetConfig ? (self: super: {})
, overrides ? (self: super: {})
, initialPackages ? import ./initial-packages.nix
, nonHackagePackages ? import ./non-hackage-packages.nix
, configurationCommon ? import ./configuration-common.nix
, configurationNix ? import ./configuration-nix.nix
}:
Expand All @@ -26,7 +27,9 @@ let
(extends packageSetConfig
(extends compilerConfig
(extends commonConfiguration
(extends nixConfiguration haskellPackages)))));
(extends nixConfiguration
(extends nonHackagePackages
haskellPackages))))));

in

Expand Down
18 changes: 18 additions & 0 deletions pkgs/development/haskell-modules/non-hackage-packages.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# EXTRA HASKELL PACKAGES NOT ON HACKAGE
#
# This file should only contain packages that are not in ./hackage-packages.nix.
# Attributes in this set should be nothing more than a callPackage call.
# Overrides to these packages should go to either configuration-nix.nix,
# configuration-common.nix or to one of the compiler specific configuration
# files.
self: super: {

multi-ghc-travis = throw ("haskellPackages.multi-ghc-travis has been renamed"
+ "to haskell-ci, which is now on hackage");

# https://github.com/channable/vaultenv/issues/1
vaultenv = self.callPackage ../tools/haskell/vaultenv { };

# https://github.com/diku-dk/futhark/issues/614
futhark = self.callPackage ../compilers/futhark { };
}
24 changes: 24 additions & 0 deletions pkgs/tools/audio/mpdsync/default.nix
Original file line number Diff line number Diff line change
@@ -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";

}
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down Expand Up @@ -8600,7 +8602,7 @@ with pkgs;

msitools = callPackage ../development/tools/misc/msitools { };

multi-ghc-travis = haskell.lib.justStaticExecutables haskellPackages.multi-ghc-travis;
haskell-ci = haskell.lib.justStaticExecutables haskellPackages.haskell-ci;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@basvandijk Why this change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While moving the non-hackage packages to a dedicated file I discovered that multi-ghc-travis has been renamed to haskell-ci and that haskell-ci is now on Hackage. This is explained in: 6106664

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm maybe an alias might be in order here...


neoload = callPackage ../development/tools/neoload {
licenseAccepted = (config.neoload.accept_license or false);
Expand Down