mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-07-28 14:26:59 -07:00
refactor: move packages from overlay to pkgs/
Signed-off-by: wucke13 <wucke13+github@gmail.com>
This commit is contained in:
+15
-35
@@ -1,41 +1,21 @@
|
||||
final: prev: {
|
||||
final: prev:
|
||||
|
||||
#
|
||||
### Actual rosenpass software ###
|
||||
#
|
||||
rosenpass = final.callPackage ./pkgs/rosenpass.nix { };
|
||||
rosenpass-oci-image = final.callPackage ./pkgs/rosenpass-oci-image.nix { };
|
||||
rp = final.callPackage ./pkgs/rosenpass.nix { package = "rp"; };
|
||||
let
|
||||
inherit (prev) lib;
|
||||
|
||||
release-package = final.callPackage ./pkgs/release-package.nix { };
|
||||
# root dir of this flake
|
||||
flakeRoot = ./.;
|
||||
|
||||
#
|
||||
### Appendix ###
|
||||
#
|
||||
proverif-patched = prev.proverif.overrideAttrs (old: {
|
||||
postInstall = ''
|
||||
install -D -t $out/lib cryptoverif.pvl
|
||||
'';
|
||||
});
|
||||
# all packages from the local tree
|
||||
rosenpassPackages = lib.filesystem.packagesFromDirectoryRecursive {
|
||||
# a special callPackage variant that contains our flakeRoot
|
||||
callPackage = lib.callPackageWith (final // { inherit flakeRoot; });
|
||||
|
||||
proof-proverif = final.stdenv.mkDerivation {
|
||||
name = "rosenpass-proverif-proof";
|
||||
version = "unstable";
|
||||
src = final.lib.sources.sourceByRegex ./. [
|
||||
"analyze.sh"
|
||||
"marzipan(/marzipan.awk)?"
|
||||
"analysis(/.*)?"
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
final.proverif
|
||||
final.graphviz
|
||||
];
|
||||
CRYPTOVERIF_LIB = final.proverif-patched + "/lib/cryptoverif.pvl";
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
bash analyze.sh -color -html $out
|
||||
'';
|
||||
# local tree of packages
|
||||
directory = ./pkgs;
|
||||
};
|
||||
|
||||
whitepaper = final.callPackage ./pkgs/whitepaper.nix { };
|
||||
in
|
||||
{
|
||||
inherit rosenpassPackages;
|
||||
}
|
||||
// rosenpassPackages
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
flakeRoot,
|
||||
graphviz,
|
||||
proverif,
|
||||
proverif-patched,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "rosenpass-proverif-proof";
|
||||
version = "unstable";
|
||||
src = lib.sources.sourceByRegex flakeRoot [
|
||||
"analyze.sh"
|
||||
"marzipan(/marzipan.awk)?"
|
||||
"analysis(/.*)?"
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
proverif
|
||||
graphviz
|
||||
];
|
||||
CRYPTOVERIF_LIB = proverif-patched + "/lib/cryptoverif.pvl";
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
bash analyze.sh -color -html $out
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ proverif }:
|
||||
|
||||
proverif.overrideAttrs (old: {
|
||||
postInstall = ''
|
||||
install -D -t $out/lib cryptoverif.pvl
|
||||
'';
|
||||
})
|
||||
@@ -0,0 +1 @@
|
||||
{ rosenpass }: rosenpass.override { package = "rp"; }
|
||||
Reference in New Issue
Block a user