Skip to content

Commit 702fd77

Browse files
authored
Merge pull request #65 from blackheaven/fix/sync-after-restructuration
fix: update security-advisory to restore (#64)
2 parents cdd99f9 + 9e71ed6 commit 702fd77

File tree

15 files changed

+188
-52
lines changed

15 files changed

+188
-52
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Freeze
4646
run: cabal freeze
4747
- name: Cache
48-
uses: actions/cache@v4.0.2
48+
uses: actions/cache@v4
4949
with:
5050
path: ${{ steps.setup-haskell.outputs.cabal-store }}
5151
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}

cabal-audit.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ library
8484
, filepath
8585
, fused-effects
8686
, hsec-core
87+
, hsec-sync
8788
, hsec-tools
8889
, http-client
8990
, kan-extensions

cabal.project

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,36 @@ source-repository-package
66
type: git
77
subdir: code/hsec-tools
88
location: https://github.com/haskell/security-advisories.git
9-
tag: add617d5026bd31cad2bdbe8259b5f67381db246
9+
tag: fc3453aa95edb296b1e4409f53d1c1210b479fc8
10+
11+
source-repository-package
12+
type: git
13+
subdir: code/hsec-sync
14+
location: https://github.com/haskell/security-advisories.git
15+
tag: fc3453aa95edb296b1e4409f53d1c1210b479fc8
1016

1117
source-repository-package
1218
type: git
1319
subdir: code/hsec-core
1420
location: https://github.com/haskell/security-advisories.git
15-
tag: add617d5026bd31cad2bdbe8259b5f67381db246
21+
tag: fc3453aa95edb296b1e4409f53d1c1210b479fc8
1622

1723
source-repository-package
1824
type: git
1925
subdir: code/cvss
2026
location: https://github.com/haskell/security-advisories.git
21-
tag: add617d5026bd31cad2bdbe8259b5f67381db246
27+
tag: fc3453aa95edb296b1e4409f53d1c1210b479fc8
2228

23-
source-repository-package
29+
source-repository-packagep
2430
type: git
2531
subdir: code/osv
2632
location: https://github.com/haskell/security-advisories.git
27-
tag: add617d5026bd31cad2bdbe8259b5f67381db246
33+
tag: fc3453aa95edb296b1e4409f53d1c1210b479fc8
34+
35+
source-repository-packagep
36+
type: git
37+
subdir: code/purl
38+
location: https://github.com/haskell/security-advisories.git
39+
tag: fc3453aa95edb296b1e4409f53d1c1210b479fc8
2840

2941
test-show-details: direct

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@
8585
name = "regen-cabal-audit-nix";
8686
runtimeInputs = [pkgs.cabal2nix pkgs.alejandra];
8787
text = let
88-
v = "ef73a3748f31d8df1557546b26d2d587cdacf459";
88+
v = "fc3453aa95edb296b1e4409f53d1c1210b479fc8";
8989
cmd = pkg: ''
9090
cabal2nix https://github.com/haskell/security-advisories.git \
9191
--revision ${v} \
9292
--subpath code/${pkg}/ > ./${pkg}.nix
9393
'';
9494
in ''
9595
pushd "$PRJ_ROOT"/nix
96-
${lib.concatStrings (map cmd ["osv" "cvss" "hsec-core" "hsec-tools"])}
96+
${lib.concatStrings (map cmd ["osv" "purl" "cvss" "hsec-core" "hsec-sync" "hsec-tools"])}
9797
cabal2nix ../. > ./cabal-audit.nix
9898
alejandra ./.
9999
popd

nix/cabal-audit.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
filepath,
1212
fused-effects,
1313
hsec-core,
14+
hsec-sync,
1415
hsec-tools,
1516
hspec,
1617
http-client,
@@ -46,6 +47,7 @@ mkDerivation {
4647
filepath
4748
fused-effects
4849
hsec-core
50+
hsec-sync
4951
hsec-tools
5052
http-client
5153
kan-extensions

nix/cvss.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
}:
1010
mkDerivation {
1111
pname = "cvss";
12-
version = "0.2";
12+
version = "0.2.0.1";
1313
src = fetchgit {
1414
url = "https://github.com/haskell/security-advisories.git";
15-
sha256 = "1x4zsw56hj13j2pc75vfdkw645r061a9h4rv26c6361j7wrpyr67";
16-
rev = "ef73a3748f31d8df1557546b26d2d587cdacf459";
15+
sha256 = "114wj60jfdqb95h3fh3k8s0jy2nzya04rchidfdapnn0l5mf3xhn";
16+
rev = "fc3453aa95edb296b1e4409f53d1c1210b479fc8";
1717
fetchSubmodules = true;
1818
};
1919
postUnpack = "sourceRoot+=/code/cvss/; echo source root reset to $sourceRoot";

nix/haskell-overlay.nix

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
{hlib, ...}: hfinal: hprev: {
1+
_: hfinal: hprev: {
22
cabal-audit = hfinal.callPackage ./cabal-audit.nix {};
33
osv = hfinal.callPackage ./osv.nix {};
4-
hsec-core = hlib.doJailbreak (hfinal.callPackage ./hsec-core.nix {});
5-
hsec-tools = hlib.doJailbreak (hfinal.callPackage ./hsec-tools.nix {});
4+
purl = hfinal.callPackage ./purl.nix {};
5+
hsec-core = hfinal.callPackage ./hsec-core.nix {};
6+
hsec-sync = hfinal.callPackage ./hsec-sync.nix {};
7+
hsec-tools = hfinal.callPackage ./hsec-tools.nix {};
68
cvss = hfinal.callPackage ./cvss.nix {};
79

810
Cabal-syntax = hprev.Cabal-syntax_3_12_1_0;

nix/haskell-shell.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
shellFor,
33
haskell-language-server,
44
fourmolu,
5+
cabal-audit,
56
...
67
}:
78
shellFor {
89
packages = hps: [hps.cabal-audit];
910
nativeBuildInputs = [haskell-language-server fourmolu];
11+
inputsFrom = [cabal-audit.env];
1012
}

nix/hsec-core.nix

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
}:
1616
mkDerivation {
1717
pname = "hsec-core";
18-
version = "0.2.0.1";
18+
version = "0.2.1.0";
1919
src = fetchgit {
2020
url = "https://github.com/haskell/security-advisories.git";
21-
sha256 = "1x4zsw56hj13j2pc75vfdkw645r061a9h4rv26c6361j7wrpyr67";
22-
rev = "ef73a3748f31d8df1557546b26d2d587cdacf459";
21+
sha256 = "114wj60jfdqb95h3fh3k8s0jy2nzya04rchidfdapnn0l5mf3xhn";
22+
rev = "fc3453aa95edb296b1e4409f53d1c1210b479fc8";
2323
fetchSubmodules = true;
2424
};
2525
postUnpack = "sourceRoot+=/code/hsec-core/; echo source root reset to $sourceRoot";
@@ -33,7 +33,14 @@ mkDerivation {
3333
text
3434
time
3535
];
36-
testHaskellDepends = [base cvss tasty tasty-hunit text];
36+
testHaskellDepends = [
37+
base
38+
Cabal-syntax
39+
cvss
40+
tasty
41+
tasty-hunit
42+
text
43+
];
3744
description = "Core package representing Haskell advisories";
3845
license = lib.licenses.bsd3;
3946
}

nix/hsec-sync.nix

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
mkDerivation,
3+
base,
4+
bytestring,
5+
directory,
6+
either,
7+
extra,
8+
fetchgit,
9+
filepath,
10+
http-client,
11+
lens,
12+
lib,
13+
optparse-applicative,
14+
tar,
15+
tasty,
16+
tasty-hunit,
17+
temporary,
18+
text,
19+
transformers,
20+
wreq,
21+
zlib,
22+
}:
23+
mkDerivation {
24+
pname = "hsec-sync";
25+
version = "0.2.0.2";
26+
src = fetchgit {
27+
url = "https://github.com/haskell/security-advisories.git";
28+
sha256 = "114wj60jfdqb95h3fh3k8s0jy2nzya04rchidfdapnn0l5mf3xhn";
29+
rev = "fc3453aa95edb296b1e4409f53d1c1210b479fc8";
30+
fetchSubmodules = true;
31+
};
32+
postUnpack = "sourceRoot+=/code/hsec-sync/; echo source root reset to $sourceRoot";
33+
isLibrary = true;
34+
isExecutable = true;
35+
libraryHaskellDepends = [
36+
base
37+
bytestring
38+
directory
39+
either
40+
extra
41+
filepath
42+
http-client
43+
lens
44+
tar
45+
temporary
46+
text
47+
transformers
48+
wreq
49+
zlib
50+
];
51+
executableHaskellDepends = [base optparse-applicative];
52+
testHaskellDepends = [
53+
base
54+
directory
55+
filepath
56+
tasty
57+
tasty-hunit
58+
temporary
59+
];
60+
description = "Synchronize with the Haskell security advisory database";
61+
license = lib.licenses.bsd3;
62+
mainProgram = "hsec-sync";
63+
}

0 commit comments

Comments
 (0)