File tree Expand file tree Collapse file tree 1 file changed +44
-1
lines changed Expand file tree Collapse file tree 1 file changed +44
-1
lines changed Original file line number Diff line number Diff line change 21
21
overrides = self : super : with pkgs . haskell . lib ; {
22
22
Cabal-syntax = super . Cabal-syntax_3_8_1_0 ;
23
23
} ;
24
+
24
25
modifier = drv :
25
26
pkgs . haskell . lib . addBuildTools drv ( with pkgs . haskellPackages ;
26
27
[
31
32
pkgs . nixpkgs-fmt
32
33
] ) ;
33
34
} ;
35
+
36
+ gitconfig =
37
+ pkgs . writeTextFile {
38
+ name = ".gitconfig" ;
39
+ text = ''
40
+ [safe]
41
+ directory = *
42
+ '' ;
43
+ destination = "/.gitconfig" ; # should match 'config.WorkDir'
44
+ } ;
34
45
in
35
46
{
47
+
48
+ packages . hsec-tools = pkgs . haskell . lib . justStaticExecutables ( project false ) ;
49
+ packages . hsec-tools-image =
50
+ pkgs . dockerTools . buildImage {
51
+ name = "haskell/hsec-tools" ;
52
+ tag = "latest" ;
53
+
54
+ copyToRoot = pkgs . buildEnv {
55
+ name = "image-root" ;
56
+ paths = [
57
+ self . packages . ${ system } . hsec-tools
58
+ pkgs . git . out
59
+ gitconfig
60
+ ] ;
61
+ pathsToLink = [ "/bin" "/" ] ;
62
+ } ;
63
+ config = {
64
+ Cmd = [ "/bin/hsec-tools" ] ;
65
+ Env = [
66
+ "LOCALE_ARCHIVE=${ pkgs . glibcLocales } /lib/locale/locale-archive"
67
+ "LC_TIME=en_US.UTF-8"
68
+ "LANG=en_US.UTF-8"
69
+ "LANGUAGE=en"
70
+ "LC_ALL=en_US.UTF-8"
71
+ "GIT_DISCOVERY_ACROSS_FILESYSTEM=1"
72
+ ] ;
73
+ Volumes = {
74
+ "/advisories" = { } ;
75
+ } ;
76
+ WorkDir = "/" ;
77
+ } ;
78
+ } ;
36
79
# Used by `nix build` & `nix run` (prod exe)
37
- defaultPackage = project false ;
80
+ defaultPackage = self . packages . ${ system } . hsec-tools ;
38
81
39
82
# Used by `nix develop` (dev shell)
40
83
devShell = project true ;
You can’t perform that action at this time.
0 commit comments