Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { pkgs ? import <nixpkgs> {} }:
- let
- dynamic-linker = pkgs.stdenv.cc.bintools.dynamicLinker;
- patchelf = libPath :
- ''
- chmod u+w $PURS
- patchelf --interpreter ${dynamic-linker} --set-rpath ${libPath} $PURS
- chmod u-w $PURS
- '';
- in pkgs.stdenv.mkDerivation rec {
- name = "purs-simple";
- version = "v0.13.0";
- src =
- pkgs.fetchurl {
- url = "https://github.com/purescript/purescript/releases/download/v0.13.0/linux64.tar.gz";
- sha256 = "06g5q69yv6c3alq9vr8zjqqzamlii7xf6vj9j52akjq5lww214ba";
- };
- buildInputs = [ pkgs.zlib
- pkgs.gmp
- pkgs.ncurses5];
- libPath = pkgs.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
- '';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement