Skip to content

Commit

Permalink
feat: add overlay and template
Browse files Browse the repository at this point in the history
  • Loading branch information
klarkc committed Jan 3, 2023
1 parent baa1c6f commit 5c08d71
Show file tree
Hide file tree
Showing 9 changed files with 5,383 additions and 40 deletions.
2,253 changes: 2,222 additions & 31 deletions flake.lock

Large diffs are not rendered by default.

30 changes: 24 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,35 @@

inputs =
{
#ctl.url = "github:Plutonomicon/cardano-transaction-lib";
# pinned to match github:LovelaceAcademy/purs-nix
ctl.url = "github:LovelaceAcademy/cardano-transaction-lib/790bd5963a5b3e4c231b83288c91f632a2d6101e";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
#purs-nix.url = "github:purs-nix/purs-nix";
utils.url = "github:ursi/flake-utils";
get-flake.url = "github:ursi/get-flake";
package-set-repo.url = "github:purescript/package-sets";
# pinned because of CTL
package-set-repo.url = "github:purescript/package-sets/dffcbcfe9b35a3a826e4389fade3e2b28fb0c614";
package-set-repo.flake = false;
get-flake.url = "github:ursi/get-flake";
};

outputs = { utils, ... }@inputs:
utils.apply-systems
outputs = { self, utils, ... }@inputs:
let
overlays = {
purs-nix = import ./nix/purs-nix.nix
inputs.package-set-repo
inputs.ctl;
};
templates.default.path = ./nix/template;
templates.default.description = "la-ctl template";
in
{ inherit templates overlays; } // utils.apply-systems
{ inherit inputs; }
({ pkgs, ... }: { });
({ pkgs, system, ... }:
let
in
{
#checks.template = (inputs.get-flake ./nix/template).checks.${system};
});
}


3 changes: 0 additions & 3 deletions nix/generate.nix

This file was deleted.

139 changes: 139 additions & 0 deletions nix/purs-nix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
package-set-repo: ctl: final: prev:
let
b = builtins;
p = final;
l = p.lib;
package-set = l.importJSON (package-set-repo + /packages.json);
packages = l.pipe package-set [
(l.mapAttrsToList (n: v: { inherit n v; }))
(b.foldl'
(acc: { n, v }: acc // {
${n} = {
src.git = { inherit (v) repo rev; };
info = {
version = b.substring 1 (b.stringLength v.version) v.version;
dependencies = b.foldl' (acc': d: acc' + d + " ") "" v.dependencies;
};
};
})
{ }
)
];
ctl-packages = with packages; packages // {
# TODO: automate the set generation using CTL input
# pinned to match github:LovelaceAcademy/purs-nix
aeson = {
src.git = {
repo = "https://github.com/LovelaceAcademy/purescript-aeson.git";
rev = "85449440c264d5eedf1acbdf8649fc8eb035e50b";
};
info = /package.nix;
};
aeson-helpers = {
src.git = {
repo = "https://github.com/mlabs-haskell/purescript-bridge-aeson-helpers.git";
rev = "44d0dae060cf78babd4534320192b58c16a6f45b";
};
info = {
dependencies = [
aff
argonaut-codecs
argonaut-core
arrays
bifunctors
contravariant
control
effect
either
enums
foldable-traversable
foreign-object
maybe
newtype
ordered-collections
prelude
profunctor
psci-support
quickcheck
record
spec
spec-quickcheck
transformers
tuples
typelevel-prelude
];
};
};

sequences = {
src.git = {
repo = "https://github.com/LovelaceAcademy/purescript-sequences";
rev = "e37a04e5b88e0cdc2bc92d32aaf281ed61f9fdb0";
};
info = /package.nix;
};

properties = {
src.git = {
repo = "https://github.com/LovelaceAcademy/purescript-properties.git";
rev = "69c73d0eeeea79f7a73ec18976fda89e404d7760";
};
info = /package.nix;
};

lattice = {
src.git = {
repo = "https://github.com/LovelaceAcademy/purescript-lattice.git";
rev = "80f7411d1f51d033a3a1b2d2a15bac3e06e81e5c";
};
info = /package.nix;
};

mote = {
src.git = {
repo = "https://github.com/garyb/purescript-mote.git";
rev = "29aea4ad7b013d50b42629c87b01cf0202451abd";
};
info = {
dependencies = [
these
transformers
arrays
];
};
};

medea = {
src.git = {
repo = "https://github.com/LovelaceAcademy/medea-ps.git";
rev = "1c34dbeba9534aaecb874fd17ede8dfe62923a92";
};
info = /package.nix;
};

toppokki = {
src.git = {
repo = "https://github.com/firefrorefiddle/purescript-toppokki";
ref = "mike/browserpages";
rev = "6983e07bf0aa55ab779bcef12df3df339a2b5bd9";
};
info = {
dependencies = [
prelude
record
functions
node-http
aff-promise
node-buffer
node-fs-aff
];
};
};

bigints.src.flake.url = "github:LovelaceAcademy/purescript-bigints/1e7e8a260b3283307fa887be26300fb29604799a";

affjax.src.flake.url = "github:LovelaceAcademy/purescript-affjax/c24e75155cf2b243472b6f163a7772290a603ed1";

};
in
{ la-ctl = ctl-packages; }
1 change: 1 addition & 0 deletions nix/template/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake.lock linguist-generated=true
1 change: 1 addition & 0 deletions nix/template/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.psc-ide-port
Loading

0 comments on commit 5c08d71

Please sign in to comment.