Skip to content

Commit

Permalink
Merge pull request #201 from OWASP/develop
Browse files Browse the repository at this point in the history
feat: add Nix flake files
  • Loading branch information
shsingh authored Feb 14, 2024
2 parents 6924f42 + 6039588 commit 3abdcd3
Show file tree
Hide file tree
Showing 4 changed files with 1,063 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
source 'https://rubygems.org'
group :jekyll_plugins do
gem "github-pages"
gem 'github-pages'
end

gem "webrick", "~> 1.8"
gem 'webrick', '~> 1.8'
61 changes: 61 additions & 0 deletions flake.lock

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

45 changes: 45 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
description = "OWASP - Machine Learning Security Top 10";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};

gems = pkgs.bundlerEnv {
name = "gems";
ruby = pkgs.ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in
with pkgs;
{
devShells.default =
mkShell {
buildInputs = [ gems bundix ];
};

packages.default =
stdenv.mkDerivation {
name = "owasp-machine-learning-security-top-10";
src = self;
buildInputs = [ gems ];
buildPhase = ''
${gems}/bin/jekyll build
'';
installPhase = ''
mkdir -p $out
cp -r result/_site $out/_site
'';
};
}
);
}

Loading

0 comments on commit 3abdcd3

Please sign in to comment.