Merge pull request #57927 from justinwoo/purescript-binary
purescript: fix purescript derivation using easy-purescript-nix
This commit is contained in:
commit
5c9b1c3a48
@ -2370,6 +2370,11 @@
|
|||||||
github = "juliendehos";
|
github = "juliendehos";
|
||||||
name = "Julien Dehos";
|
name = "Julien Dehos";
|
||||||
};
|
};
|
||||||
|
justinwoo = {
|
||||||
|
email = "moomoowoo@gmail.com";
|
||||||
|
github = "justinwoo";
|
||||||
|
name = "Justin Woo";
|
||||||
|
};
|
||||||
jwiegley = {
|
jwiegley = {
|
||||||
email = "johnw@newartisans.com";
|
email = "johnw@newartisans.com";
|
||||||
github = "jwiegley";
|
github = "jwiegley";
|
||||||
|
60
pkgs/development/compilers/purescript/purescript/default.nix
Normal file
60
pkgs/development/compilers/purescript/purescript/default.nix
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
{ stdenv, fetchurl, zlib, gmp, ncurses5, lib }:
|
||||||
|
|
||||||
|
# from justinwoo/easy-purescript-nix
|
||||||
|
# https://github.com/justinwoo/easy-purescript-nix/blob/d383972c82620a712ead4033db14110497bc2c9c/purs.nix
|
||||||
|
|
||||||
|
let
|
||||||
|
dynamic-linker = stdenv.cc.bintools.dynamicLinker;
|
||||||
|
|
||||||
|
patchelf = libPath :
|
||||||
|
if stdenv.isDarwin
|
||||||
|
then ""
|
||||||
|
else
|
||||||
|
''
|
||||||
|
chmod u+w $PURS
|
||||||
|
patchelf --interpreter ${dynamic-linker} --set-rpath ${libPath} $PURS
|
||||||
|
chmod u-w $PURS
|
||||||
|
'';
|
||||||
|
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
name = "purs-simple";
|
||||||
|
version = "v0.12.3";
|
||||||
|
|
||||||
|
src =
|
||||||
|
if stdenv.isDarwin
|
||||||
|
then
|
||||||
|
fetchurl {
|
||||||
|
url = "https://github.com/purescript/purescript/releases/download/v0.12.3/macos.tar.gz";
|
||||||
|
sha256 = "1f916gv4fz571l4jvr15xjnsvjyy4nljv2ii9njwlm7k6yr5m0qn";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
fetchurl {
|
||||||
|
url = "https://github.com/purescript/purescript/releases/download/v0.12.3/linux64.tar.gz";
|
||||||
|
sha256 = "1fad862a2sv4njxbbcfzibbi585m6is3ywb94nmjl8ax254baj3i";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
buildInputs = [ zlib
|
||||||
|
gmp
|
||||||
|
ncurses5 ];
|
||||||
|
libPath = lib.makeLibraryPath buildInputs;
|
||||||
|
dontStrip = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
PURS="$out/bin/purs"
|
||||||
|
|
||||||
|
install -D -m555 -T purs $PURS
|
||||||
|
${patchelf libPath}
|
||||||
|
|
||||||
|
mkdir -p $out/etc/bash_completion.d/
|
||||||
|
$PURS --bash-completion-script $PURS > $out/etc/bash_completion.d/purs-completion.bash
|
||||||
|
'';
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A strongly-typed functional programming language that compiles to JavaScript";
|
||||||
|
homepage = http://www.purescript.org/;
|
||||||
|
license = licenses.bsd3;
|
||||||
|
maintainers = [ maintainers.justinwoo ];
|
||||||
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||||
|
};
|
||||||
|
}
|
@ -7137,8 +7137,8 @@ in
|
|||||||
|
|
||||||
all-cabal-hashes = callPackage ../data/misc/hackage { };
|
all-cabal-hashes = callPackage ../data/misc/hackage { };
|
||||||
|
|
||||||
# Build with ghc 8.4 due to https://github.com/NixOS/nixpkgs/issues/53597
|
purescript = callPackage ../development/compilers/purescript/purescript { };
|
||||||
purescript = haskell.lib.justStaticExecutables haskell.packages.ghc844.purescript;
|
|
||||||
psc-package = haskell.lib.justStaticExecutables
|
psc-package = haskell.lib.justStaticExecutables
|
||||||
(haskellPackages.callPackage ../development/compilers/purescript/psc-package { });
|
(haskellPackages.callPackage ../development/compilers/purescript/psc-package { });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user