Skip to content

Commit

Permalink
Add nix flake
Browse files Browse the repository at this point in the history
No devshell though
  • Loading branch information
emneo-dev committed Jul 19, 2024
1 parent 4687ea9 commit b42d7d7
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 0 deletions.
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.

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

outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachSystem ["x86_64-linux"] (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
packages = rec {
liskvork = default;
default = pkgs.stdenvNoCC.mkDerivation rec {
name = "liskvork";

src = ./.;
nativeBuildInputs = with pkgs; [
gcc
gnumake
];

checkInputs = with pkgs; [
criterion
];

doCheck = true;
checkPhase = ''
make tests_run
'';

installPhase = ''
mkdir -p $out/bin
install -D ${name} $out/bin/${name} --mode 0755
'';
};
};
});
}

0 comments on commit b42d7d7

Please sign in to comment.