File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " nix-build with tests"
2+ on :
3+ pull_request :
4+ push :
5+ jobs :
6+ tests :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v4
10+ - uses : cachix/install-nix-action@v27
11+ with :
12+ nix_path : nixpkgs=channel:nixos-unstable
13+ - run : nix-build
Original file line number Diff line number Diff line change 11rec {
2- sources = import ./sources.nix ;
2+ chooseSources =
3+ if builtins . pathExists /home/dan/pro/nixpkgs
4+ then ./local.sources.json
5+ else
6+ if builtins . pathExists ./sources.json
7+ then ./sources.json
8+ else null ;
9+ sources = import ./sources.nix { inherit chooseSources ; } ;
310 defaultNixpkgs = import sources . nixpkgs ;
411 pkgSetForSystem = system : args : defaultNixpkgs ( args // { inherit system ; } ) ;
512 pkgSet = pkgSetForSystem builtins . currentSystem ;
Original file line number Diff line number Diff line change @@ -14,9 +14,14 @@ in hfinal: hprev:
1414( listToAttrs ( map ( a :
1515 nameValuePair a . name
1616 ( dontCheck ( hfinal . callCabal2nix a . name a . source { } ) ) ) [
17- { name = "th-utilities" ; source = sources . th-utilities ; }
1817 { name = "HList" ; source = sources . HList ; }
1918 ] ) ) // {
19+ "th-utilities" = hfinal . callHackageDirect
20+ { pkg = "th-utilities" ;
21+ ver = "0.2.5.2" ;
22+ sha256 = "sha256-IEl2Uzsv/fr+546jCIDqUvcRZA/QRm6Xe0cmahMdcnA=" ;
23+ } { } ;
24+
2025 "th-lock" = hfinal . callHackageDirect
2126 { pkg = "th-lock" ;
2227 ver = "0.0.4" ;
Original file line number Diff line number Diff line change 1+ {
2+ "HList" : {
3+ "branch" : " master" ,
4+ "repo" : " file:///home/dan/pro/haskell/hlist" ,
5+ "rev" : " e688f11d7432c812c2b238464401a86f588f81e1" ,
6+ "type" : " git"
7+ },
8+ "nixpkgs" : {
9+ "branch" : " master" ,
10+ "repo" : " /home/dan/pro/nixpkgs" ,
11+ "rev" : " e7a98efedcc1d0a2a8455580c562b20718c36444" ,
12+ "type" : " git"
13+ },
14+ "upload-doc-to-hackage" : {
15+ "sha256" : " 0r1q21dngyalrm0ad204y470wr3s89mssbw9qi195hpgbp8qs8d2" ,
16+ "type" : " tarball" ,
17+ "url" : " https://github.com/yaitskov/upload-doc-to-hackage/archive/a180b14b21610ce39f296ad7b9dcf6dfe9ac69cf.tar.gz" ,
18+ "url_template" : " https://github.com/yaitskov/upload-doc-to-hackage/archive/a180b14b21610ce39f296ad7b9dcf6dfe9ac69cf.tar.gz"
19+ }
20+ }
Original file line number Diff line number Diff line change 11{
2- "th-utilities" : {
3- "branch" : " master" ,
4- "repo" : " file:///home/dan/pro/haskell/th-utilities" ,
5- "rev" : " a23f715b932c1b4f49cabc41694c08b16b0e7ff8" ,
6- "type" : " git"
7- },
8- "HList" : {
9- "branch" : " master" ,
10- "repo" : " file:///home/dan/pro/haskell/hlist" ,
11- "rev" : " e688f11d7432c812c2b238464401a86f588f81e1" ,
12- "type" : " git"
13- },
14- "nixpkgs" : {
15- "branch" : " master" ,
16- "repo" : " /home/dan/pro/nixpkgs" ,
17- "rev" : " e7a98efedcc1d0a2a8455580c562b20718c36444" ,
18- "type" : " git"
19- }
2+ "HList" : {
3+ "branch" : " master" ,
4+ "repo" : " https://bitbucket.org/HList/hlist" ,
5+ "rev" : " e688f11d7432c812c2b238464401a86f588f81e1" ,
6+ "type" : " git"
7+ },
8+ "nixpkgs" : {
9+ "branch" : " master" ,
10+ "owner" : " NixOS" ,
11+ "repo" : " nixpkgs" ,
12+ "rev" : " e7a98efedcc1d0a2a8455580c562b20718c36444" ,
13+ "sha256" : " sha256:0pcvllrvnbr2s1sfc8gizz864b1wwz9mac3ri3fmkrxvajwlmmdd" ,
14+ "type" : " tarball" ,
15+ "url" : " https://github.com/NixOS/nixpkgs/archive/e7a98efedcc1d0a2a8455580c562b20718c36444.tar.gz" ,
16+ "url_template" : " https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
17+ },
18+ "upload-doc-to-hackage" : {
19+ "sha256" : " 0r1q21dngyalrm0ad204y470wr3s89mssbw9qi195hpgbp8qs8d2" ,
20+ "type" : " tarball" ,
21+ "url" : " https://github.com/yaitskov/upload-doc-to-hackage/archive/a180b14b21610ce39f296ad7b9dcf6dfe9ac69cf.tar.gz" ,
22+ "url_template" : " https://github.com/yaitskov/upload-doc-to-hackage/archive/a180b14b21610ce39f296ad7b9dcf6dfe9ac69cf.tar.gz"
23+ }
2024}
Original file line number Diff line number Diff line change 11# This file has been generated by Niv.
2-
2+ { chooseSources } :
33let
44 fetch_file = pkgs : name : spec :
55 let
130130 readJsonSources = sourcesFile : builtins . fromJSON ( builtins . readFile sourcesFile ) ;
131131
132132 mkConfig =
133- { sourcesFile ? if builtins . pathExists ./sources.json then ./sources.json else null
133+ { sourcesFile ? chooseSources
134134 , sources ? if isNull sourcesFile then { } else readJsonSources sourcesFile
135135 , system ? builtins . currentSystem
136136 , pkgs ? mkPkgs sources system
You can’t perform that action at this time.
0 commit comments