Skip to content

Commit b8eace1

Browse files
committed
fix(cvss): adapt nix setup
1 parent 269a5c5 commit b8eace1

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

code/cabal.project

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
packages: */*.cabal
2+
3+
package hsec-tools
4+
package cvss

code/cvss/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 0.1
2+
3+
Introduction

code/hsec-tools/cabal.project

Lines changed: 0 additions & 3 deletions
This file was deleted.

flake.nix

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
66
flake-utils.url = "github:numtide/flake-utils";
77
toml-parser = {
8-
url = github:glguy/toml-parser/eb7222d9d71aa00d0a37f85ff4cdef89d1ba743d; # v1.3.0.0
8+
url = "github:glguy/toml-parser/eb7222d9d71aa00d0a37f85ff4cdef89d1ba743d"; # v1.3.0.0
99
flake = false;
1010
};
1111
};
@@ -19,13 +19,16 @@
1919
jailbreakUnbreak = pkg:
2020
pkgs.haskell.lib.doJailbreak (pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.unmarkBroken pkg));
2121

22-
project = returnShellEnv:
22+
cvss = pkgs.haskellPackages.callCabal2nix "cvss" ./code/cvss {};
23+
24+
hsec-tools = returnShellEnv:
2325
pkgs.haskellPackages.developPackage {
2426
inherit returnShellEnv;
2527
name = "hsec-tools";
2628
root = ./code/hsec-tools;
2729
withHoogle = false;
28-
overrides = self: super: with pkgs.haskell.lib; {
30+
overrides = self: super: {
31+
inherit cvss;
2932
Cabal-syntax = super.Cabal-syntax_3_8_1_0;
3033
toml-parser = jailbreakUnbreak (super.callCabal2nix "toml-parser" toml-parser { });
3134
};
@@ -52,8 +55,8 @@
5255
};
5356
in
5457
{
55-
56-
packages.hsec-tools = pkgs.haskell.lib.justStaticExecutables (project false);
58+
packages.cvss = cvss;
59+
packages.hsec-tools = pkgs.haskell.lib.justStaticExecutables (hsec-tools false);
5760
packages.hsec-tools-image =
5861
pkgs.dockerTools.buildImage {
5962
name = "haskell/hsec-tools";
@@ -89,6 +92,6 @@
8992
defaultPackage = self.packages.${system}.hsec-tools;
9093

9194
# Used by `nix develop` (dev shell)
92-
devShell = project true;
95+
devShell = hsec-tools true;
9396
});
9497
}

0 commit comments

Comments
 (0)