Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
cidkidnix committed Nov 15, 2023
1 parent 9d90729 commit 4fe6b3d
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 4 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.json
dist-newstyle
CVE
cves.zip
.direnv
3 changes: 2 additions & 1 deletion CVENix.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ common warnings

library
import: warnings
exposed-modules: CVENix.CVE
exposed-modules: CVENix.CVE,
CVENix.SBOM

build-depends: base ^>=4.17.2.0,
aeson,
Expand Down
5 changes: 2 additions & 3 deletions exe/Main.hs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module Main where

import qualified MyLib (someFunc)
import CVENix.CVE

main :: IO ()
main = do
putStrLn "Hello, Haskell!"
MyLib.someFunc
exampleParse
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};

outputs = inputs: let
lib = inputs.nixpkgs.lib;
project = self: self.callCabal2nix "CVENix" ./. {};
haskellPackages = pkgs: pkgs.haskell.packages.ghc947.override {
overrides = self: super: {
CVENix = project self;
};
};
supportedSystems = lib.genAttrs
[ "x86_64-linux"
"aarch64-linux"
];
in {
packages = supportedSystems (system: let
pkgs = inputs.nixpkgs.legacyPackages."${system}";
in { default = (haskellPackages pkgs).CVENix; });

devShells = supportedSystems (system: let
pkgs = inputs.nixpkgs.legacyPackages."${system}";
hsPkgs = haskellPackages pkgs;
in { default = hsPkgs.shellFor { packages = ps: with ps; [ CVENix ]; buildInputs = with hsPkgs; [ cabal-install ]; }; });
};
}
10 changes: 10 additions & 0 deletions src/CVENix/SBOM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ type Author = Object
type Manufacture = Object
type Supplier = Object
type License = Object
type Metadata = Object
type Hash = Object
type SWID = Object
type Pedigree = Object
type Reference = Object
type Evidence = Object
type ReleaseNote = Object
type ModelCard = Object
type Data = Object
type Properties = Object

data MetaData = MetaData
{ _metadata_timestamp :: Maybe Text
Expand Down

0 comments on commit 4fe6b3d

Please sign in to comment.