update purs

This commit is contained in:
justinwoo 2019-10-17 09:42:09 +03:00
parent 96d0fd2ab9
commit 96049fcec1
3 changed files with 61 additions and 47 deletions

View File

@ -1,18 +1,24 @@
{ pkgs ? import <nixpkgs> {} }:
let
easy-ps = import (pkgs.fetchFromGitHub {
owner = "justinwoo";
repo = "easy-purescript-nix";
rev = "50ebcb6107aec7562b8391e5b329c2856d79fc96";
sha256 = "1j7mrk094mvaadpsxcz11namrzng9pzn4yzzlzmlcn90q3jzma1v";
}) {
easy-ps = import (
pkgs.fetchFromGitHub {
owner = "justinwoo";
repo = "easy-purescript-nix";
rev = "cc7196bff3fdb5957aabfe22c3fa88267047fe88";
sha256 = "1xfl7rnmmcm8qdlsfn3xjv91my6lirs5ysy01bmyblsl10y2z9iw";
}
) {
inherit pkgs;
};
spago2nix = import ./spago-packages.nix { inherit pkgs; };
spago2nix = import ./spago-packages.nix {
inherit pkgs;
};
in spago2nix.mkBuildProjectOutput {
in
spago2nix.mkBuildProjectOutput {
src = ./src;
purs = easy-ps.purs;
}

17
ci.nix
View File

@ -1,12 +1,14 @@
{ pkgs ? import <nixpkgs> {} }:
let
easy-ps = import (pkgs.fetchFromGitHub {
owner = "justinwoo";
repo = "easy-purescript-nix";
rev = "50ebcb6107aec7562b8391e5b329c2856d79fc96";
sha256 = "1j7mrk094mvaadpsxcz11namrzng9pzn4yzzlzmlcn90q3jzma1v";
}) {
easy-ps = import (
pkgs.fetchFromGitHub {
owner = "justinwoo";
repo = "easy-purescript-nix";
rev = "cc7196bff3fdb5957aabfe22c3fa88267047fe88";
sha256 = "1xfl7rnmmcm8qdlsfn3xjv91my6lirs5ysy01bmyblsl10y2z9iw";
}
) {
inherit pkgs;
};
@ -14,6 +16,7 @@ let
inherit pkgs;
};
in pkgs.mkShell {
in
pkgs.mkShell {
buildInputs = [ easy-ps.purs spago2nix ];
}

View File

@ -1,50 +1,55 @@
let
easy-dhall-nix = pkgs: import (pkgs.fetchFromGitHub {
owner = "justinwoo";
repo = "easy-dhall-nix";
rev = "de5dfc71ce9e7597b62b470dee9254c6de09d515";
sha256 = "1103sczf2xkwgbmmkmaqf59db6q0gb18vv4v3i7py1f8nlpyv02i";
}) {
easy-dhall-nix = pkgs: import (
pkgs.fetchFromGitHub {
owner = "justinwoo";
repo = "easy-dhall-nix";
rev = "9c4397c3af63c834929b1e6ac25eed8ce4fca5d4";
sha256 = "1cbrqfbx29rymf4sia1ix4qssdybjdvw0is9gv7l0wsysidrcwhf";
}
) {
inherit pkgs;
};
in {
pkgs ? import <nixpkgs> {},
dhall-json ? (easy-dhall-nix pkgs).dhall-json-simple
in
{ pkgs ? import <nixpkgs> {}
, dhall-json ? (easy-dhall-nix pkgs).dhall-json-simple
}:
let
easy-purescript-nix = import (pkgs.fetchFromGitHub {
owner = "justinwoo";
repo = "easy-purescript-nix";
rev = "50ebcb6107aec7562b8391e5b329c2856d79fc96";
sha256 = "1j7mrk094mvaadpsxcz11namrzng9pzn4yzzlzmlcn90q3jzma1v";
}) {
inherit pkgs;
};
let
easy-purescript-nix = import (
pkgs.fetchFromGitHub {
owner = "justinwoo";
repo = "easy-purescript-nix";
rev = "cc7196bff3fdb5957aabfe22c3fa88267047fe88";
sha256 = "1xfl7rnmmcm8qdlsfn3xjv91my6lirs5ysy01bmyblsl10y2z9iw";
}
) {
inherit pkgs;
};
in pkgs.stdenv.mkDerivation {
name = "spago2nix";
in
pkgs.stdenv.mkDerivation {
name = "spago2nix";
src = pkgs.nix-gitignore.gitignoreSource [ ".git" ] ./.;
src = pkgs.nix-gitignore.gitignoreSource [ ".git" ] ./.;
buildInputs = [ pkgs.makeWrapper ];
buildInputs = [ pkgs.makeWrapper ];
installPhase = ''
mkdir -p $out/bin
target=$out/bin/spago2nix
installPhase = ''
mkdir -p $out/bin
target=$out/bin/spago2nix
>>$target echo '#!/usr/bin/env node'
>>$target echo "require('$src/bin/output.js')";
>>$target echo '#!/usr/bin/env node'
>>$target echo "require('$src/bin/output.js')";
chmod +x $target
chmod +x $target
wrapProgram $target \
--prefix PATH : ${pkgs.lib.makeBinPath [
wrapProgram $target \
--prefix PATH : ${pkgs.lib.makeBinPath [
pkgs.coreutils
pkgs.nix-prefetch-git
easy-purescript-nix.spago
dhall-json
]}
'';
}
'';
}