aboutsummaryrefslogtreecommitdiff
path: root/pkgs/default.nix
blob: 849edffca8a89c351718c1f8d99e959a2f8ff136 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ nixpkgs ? <nixpkgs>, nixlib ? nixpkgs.lib }:

let
  pkgs = nixpkgs // turrispkgs;
  callPackage = nixlib.callPackageWith pkgs;

  disableCheck = pkg: pkg.overrideAttrs (oldAttrs: {
    doCheck = false;
    doInstallCheck = false;
  });
  armv7lDisableCheck = pkg: if nixpkgs.system != "armv7l-linux" then pkg else disableCheck pkg;
  aarch64DisableCheck = pkg: if nixpkgs.system != "aarch64-linux" then pkg else disableCheck pkg;

  turrispkgs = with pkgs; {

    # Crypto and certificates
    libatsha204 = callPackage ./libatsha204 { };
    mox-otp = python3Packages.callPackage ./mox-otp { };
    #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 = armv7lDisableCheck 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;
    # 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