-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
big refactor, try to add full template.
- Loading branch information
1 parent
ad34d1a
commit 2eae601
Showing
281 changed files
with
4,127 additions
and
5,308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 13 additions & 23 deletions
36
project-scaffold-template/full-system-nixos2111-ghc8107/api-gw/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,30 @@ | ||
let | ||
sources = import ./nix/sources.nix; | ||
# Fetch the latest haskell.nix and import its default.nix | ||
haskellNix = import sources."haskell.nix" { }; | ||
haskellNix = import sources."haskell.nix" {}; | ||
# haskell.nix provides access to the nixpkgs pins which are used by our CI, hence | ||
# you will be more likely to get cache hits when using these. | ||
# But you can also just use your own, e.g. '<nixpkgs>' | ||
#nixpkgsSrc = if haskellNix.pkgs.stdenv.hostPlatform.isDarwin then sources.nixpkgs-darwin else haskellNix.sources.nixpkgs-2111; | ||
#nixpkgsSrc = if haskellNix.pkgs.stdenv.hostPlatform.isDarwin then sources.nixpkgs-darwin else haskellNix.sources.nixpkgs-{{nixos_release | remove(".")}}; | ||
# no need to check platform now | ||
nixpkgsSrc = haskellNix.sources.nixpkgs-2111; | ||
nixpkgsSrc = haskellNix.sources.nixpkgs-{{nixos_release | remove(".")}}; | ||
# haskell.nix provides some arguments to be passed to nixpkgs, including some patches | ||
# and also the haskell.nix functionality itself as an overlay. | ||
nixpkgsArgs = haskellNix.nixpkgsArgs; | ||
in { nativePkgs ? import nixpkgsSrc (nixpkgsArgs // { | ||
overlays = nixpkgsArgs.overlays ++ [ (import ./nix/overlay) ]; | ||
}), haskellCompiler ? "ghc8107", customModules ? [ ] }: | ||
let | ||
pkgs = nativePkgs; | ||
# 'cabalProject' generates a package set based on a cabal.project (and the corresponding .cabal files) | ||
in rec { | ||
in | ||
{ nativePkgs ? import nixpkgsSrc (nixpkgsArgs // { overlays = nixpkgsArgs.overlays ++ [(import ./nix/overlay)]; }) | ||
, haskellCompiler ? "ghc{{ghc_version | remove(".")}}" | ||
, customModules ? [] | ||
}: | ||
let pkgs = nativePkgs; | ||
in | ||
# 'cabalProject' generates a package set based on a cabal.project (and the corresponding .cabal files) | ||
rec { | ||
# inherit the pkgs package set so that others importing this function can use it | ||
inherit pkgs; | ||
|
||
# nativePkgs.lib.recurseIntoAttrs, just a bit more explicilty. | ||
recurseForDerivations = true; | ||
|
||
# java-analyzer-uploader = (pkgs.haskell-nix.project { | ||
# src = pkgs.haskell-nix.haskellLib.cleanGit { | ||
# name = "java-analyzer-uploader"; | ||
# src = ./.; | ||
# }; | ||
# index-state = pkgs.haskell-nix.internalHackageIndexState; | ||
# compiler-nix-name = haskellCompiler; | ||
# modules = customModules; | ||
# }); | ||
|
||
# java-analyzer-uploader-exe = java-analyzer-uploader.java-analyzer-uploader.components.exes.java-analyzer-uploader; | ||
# java-analyzer-uploader-test = java-analyzer-uploader.java-analyzer-uploader.components.tests.java-analyzer-uploader-test; | ||
|
||
} | ||
|
10 changes: 6 additions & 4 deletions
10
project-scaffold-template/full-system-nixos2111-ghc8107/api-gw/nix/overlay/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
self: prev: { | ||
# sample pakage override | ||
# xxxx = prev.xxxx.overrideAttrs (oldAttr: rec { buildInputs = prev.xxxx.buildInputs ++ [ self.openssl ]; }); | ||
} | ||
self: prev: | ||
with prev.lib; | ||
mapAttrs' (attr: _: { | ||
name = removeSuffix ".nix" attr; | ||
value = import (./. + "/${attr}") self prev; | ||
}) (filterAttrs (attr: _: attr != "default.nix") (builtins.readDir ./.)) |
8 changes: 8 additions & 0 deletions
8
project-scaffold-template/full-system-nixos2111-ghc8107/api-gw/nix/overlay/makeself.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
self: prev: | ||
|
||
# override the makeself package to make sure quiet mode is the default | ||
prev.makeself.overrideAttrs (oldAttrs: { | ||
fixupPhase = [ oldAttrs.fixupPhase ] ++ ['' | ||
sed -e "s|quiet=\"n\"|quiet=\"y\"|; s|accept=\"n\"|accept=\"y\"|; s|noprogress=\$NOPROGRESS|noprogress=\"y\"|" -i $out/share/makeself-2.4.2/makeself-header.sh | ||
'']; | ||
}) |
22 changes: 0 additions & 22 deletions
22
...-scaffold-template/full-system-nixos2111-ghc8107/api-gw/openresty/web/asset-manifest.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-3.78 KB
project-scaffold-template/full-system-nixos2111-ghc8107/api-gw/openresty/web/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion
1
project-scaffold-template/full-system-nixos2111-ghc8107/api-gw/openresty/web/index.html
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-5.22 KB
...caffold-template/full-system-nixos2111-ghc8107/api-gw/openresty/web/logo192.png
Binary file not shown.
Binary file removed
BIN
-9.44 KB
...caffold-template/full-system-nixos2111-ghc8107/api-gw/openresty/web/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions
25
project-scaffold-template/full-system-nixos2111-ghc8107/api-gw/openresty/web/manifest.json
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
project-scaffold-template/full-system-nixos2111-ghc8107/api-gw/openresty/web/robots.txt
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
...ate/full-system-nixos2111-ghc8107/api-gw/openresty/web/static/css/main.6dea0f05.chunk.css
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...full-system-nixos2111-ghc8107/api-gw/openresty/web/static/css/main.6dea0f05.chunk.css.map
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...template/full-system-nixos2111-ghc8107/api-gw/openresty/web/static/js/2.4721db26.chunk.js
This file was deleted.
Oops, something went wrong.
116 changes: 0 additions & 116 deletions
116
...l-system-nixos2111-ghc8107/api-gw/openresty/web/static/js/2.4721db26.chunk.js.LICENSE.txt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...late/full-system-nixos2111-ghc8107/api-gw/openresty/web/static/js/2.4721db26.chunk.js.map
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
...template/full-system-nixos2111-ghc8107/api-gw/openresty/web/static/js/3.dd67abe3.chunk.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.