aboutsummaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/certgen/default.nix25
-rw-r--r--pkgs/crypto-wrapper/default.nix28
-rw-r--r--pkgs/default.nix31
-rw-r--r--pkgs/libatsha204/default.nix3
-rw-r--r--pkgs/libatsha204/multiple-definitions.patch13
-rw-r--r--pkgs/patches/0001-configure.ac-replace-AC_CHECK_FILE.patch (renamed from pkgs/0001-configure.ac-replace-AC_CHECK_FILE.patch)0
6 files changed, 69 insertions, 31 deletions
diff --git a/pkgs/certgen/default.nix b/pkgs/certgen/default.nix
new file mode 100644
index 0000000..3818b9b
--- /dev/null
+++ b/pkgs/certgen/default.nix
@@ -0,0 +1,25 @@
+{ buildPythonApplication, lib, fetchgit
+, python3
+, crypto-wrapper
+}:
+
+buildPythonApplication rec {
+ pname = "sentinel-certgen";
+ version = "6.2";
+ meta = with lib; {
+ homepage = "https://gitlab.nic.cz/turris/sentinel/certgen";
+ description = "Sentinel automated passwords and certificates retrieval";
+ license = licenses.gpl3;
+ };
+
+ src = fetchgit {
+ url = "https://gitlab.nic.cz/turris/sentinel/certgen.git";
+ rev = "v" + version;
+ sha256 = "10ii3j3wqdib7m2fc0w599981mv9q3ahj96q4kyrn5sh18v2c7nb";
+ };
+
+ propagatedBuildInputs = with python3.pkgs; [
+ crypto-wrapper
+ six requests cryptography
+ ];
+}
diff --git a/pkgs/crypto-wrapper/default.nix b/pkgs/crypto-wrapper/default.nix
new file mode 100644
index 0000000..3f431b2
--- /dev/null
+++ b/pkgs/crypto-wrapper/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, lib, fetchgit
+, bash
+, makeWrapper
+}:
+
+stdenv.mkDerivation rec {
+ pname = "crypto-wrapper";
+ version = "0.4";
+ meta = with lib; {
+ homepage = "https://gitlab.nic.cz/turris/crypto-wrapper";
+ description = "Simple script abstracting access to the Turris crypto backend.";
+ platforms = platforms.linux;
+ license = licenses.gpl3;
+ };
+
+ src = fetchgit {
+ url = "https://gitlab.nic.cz/turris/crypto-wrapper.git";
+ rev = "v" + version;
+ sha256 = "1ly37cajkmgqmlj230h5az9m2m1rgvf4r0bf94yipp80wl0z215s";
+ };
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp crypto-wrapper.sh $out/bin/crypto-wrapper
+ wrapProgram $out/bin/crypto-wrapper \
+ --prefix PATH : ${lib.makeBinPath [ bash openssl coreutils ]}
+ '';
+}
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 929d030..a64757f 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -19,37 +19,6 @@ let
#crypto-wrapper = callPackage ./crypto-wrapper { };
#certgen = python3Packages.callPackage ./certgen { };
- # Overrides to get build to work
- patchelf = armv7lDisableCheck nixpkgs.patchelf;
- bison = armv7lDisableCheck nixpkgs.bison;
- findutils = armv7lDisableCheck nixpkgs.findutils;
- libuv = armv7lDisableCheck nixpkgs.libuv;
- p11-kit = armv7lDisableCheck nixpkgs.p11-kit;
- elfutils = armv7lDisableCheck nixpkgs.elfutils;
- glib = armv7lDisableCheck nixpkgs.glib;
- rustc = armv7lDisableCheck nixpkgs.rustc;
- mdbook = armv7lDisableCheck nixpkgs.mdbook;
- ell = armv7lDisableCheck nixpkgs.ell;
- polkit = armv7lDisableCheck nixpkgs.polkit;
- udisks2 = disableCheck nixpkgs.udisks2;
- udisks = udisks2;
- llvm = armv7lDisableCheck nixpkgs.llvm;
- llvm_14 = armv7lDisableCheck nixpkgs.llvm_14;
- jemalloc = armv7lDisableCheck nixpkgs.jemalloc;
- openssh = armv7lDisableCheck nixpkgs.openssh;
- nlohmann_json = armv7lDisableCheck nixpkgs.nlohmann_json;
- libseccomp = armv7lDisableCheck nixpkgs.libseccomp;
- openldap = armv7lDisableCheck nixpkgs.openldap;
- # Crosscompilation worarounds
- btrfs-progs = nixpkgs.btrfs-progs.overrideAttrs (oldAttrs: {
- configureFlags = ["--disable-python"];
- installFlags = [];
- });
- pixz = nixpkgs.pixz.overrideAttrs (oldAttrs: {
- configureFlags = ["--without-manpage"];
- patches = [ ./0001-configure.ac-replace-AC_CHECK_FILE.patch ];
- });
-
};
in turrispkgs
diff --git a/pkgs/libatsha204/default.nix b/pkgs/libatsha204/default.nix
index 96a621d..10cd859 100644
--- a/pkgs/libatsha204/default.nix
+++ b/pkgs/libatsha204/default.nix
@@ -19,6 +19,9 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
sha256 = "1lhvqdy2sfbvz9y9lwqhxggpr8rwfd66v73gv9s7b7811r6way20";
};
+ patches = [
+ ./multiple-definitions.patch
+ ];
buildInputs = [openssl unbound];
nativeBuildInputs = [pkg-config perl patchelf];
diff --git a/pkgs/libatsha204/multiple-definitions.patch b/pkgs/libatsha204/multiple-definitions.patch
new file mode 100644
index 0000000..94dd5fc
--- /dev/null
+++ b/pkgs/libatsha204/multiple-definitions.patch
@@ -0,0 +1,13 @@
+diff --git a/src/libatsha204/dnsmagic.c b/src/libatsha204/dnsmagic.c
+index d5f82b4..dc0bb90 100644
+--- a/src/libatsha204/dnsmagic.c
++++ b/src/libatsha204/dnsmagic.c
+@@ -42,7 +42,7 @@
+ /*
+ * Global variable with configuration and some initial config values.
+ */
+-atsha_configuration g_config;
++extern atsha_configuration g_config;
+
+ /*
+ * Get decimal number from its string representation
diff --git a/pkgs/0001-configure.ac-replace-AC_CHECK_FILE.patch b/pkgs/patches/0001-configure.ac-replace-AC_CHECK_FILE.patch
index 8b377f3..8b377f3 100644
--- a/pkgs/0001-configure.ac-replace-AC_CHECK_FILE.patch
+++ b/pkgs/patches/0001-configure.ac-replace-AC_CHECK_FILE.patch