Merge branch 'main' of gh:greg-hellings/nixos-config
This commit is contained in:
@@ -35,10 +35,12 @@
|
||||
inputs.ffmac.overlay
|
||||
];
|
||||
|
||||
unstable = args: (machine (args // { channel = nixunstable; }));
|
||||
machine = {
|
||||
system ? "x86_64-linux",
|
||||
name,
|
||||
channel ? stable
|
||||
channel ? stable,
|
||||
extraMods ? []
|
||||
}:
|
||||
let
|
||||
nixpkgs = channel;
|
||||
@@ -47,7 +49,6 @@
|
||||
modules = [
|
||||
{ nixpkgs.overlays = overlays; }
|
||||
agenix.nixosModule
|
||||
wsl.nixosModules.wsl
|
||||
./modules-all
|
||||
./modules-linux
|
||||
./hosts/${name}
|
||||
@@ -58,7 +59,7 @@
|
||||
inherit nixpkgs;
|
||||
};
|
||||
}
|
||||
];
|
||||
] ++ extraMods;
|
||||
specialArgs = {
|
||||
home-manager = inputs.home-manager;
|
||||
inherit nixpkgs;
|
||||
@@ -67,16 +68,16 @@
|
||||
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
"2maccabees" = machine { system = "aarch64-linux"; name = "2maccabees"; channel = nixunstable; };
|
||||
jude = machine { name = "jude"; channel = nixunstable; };
|
||||
"icdm-root" = machine { name = "icdm-root"; };
|
||||
"2maccabees" = unstable { system = "aarch64-linux"; name = "2maccabees"; };
|
||||
jude = unstable { name = "jude"; };
|
||||
"icdm-root" = unstable { name = "icdm-root"; };
|
||||
"linode" = machine { name = "linode"; };
|
||||
"lappy" = machine { name = "lappy"; };
|
||||
"iso" = machine { name = "iso"; };
|
||||
# nix build '.#nixosConfigurations.wsl.config.system.build.installer'
|
||||
"nixos" = machine { name = "wsl"; system = "aarch64-linux"; channel = nixunstable; };
|
||||
"nixos" = unstable { name = "wsl"; system = "aarch64-linux"; extraMods = [ wsl.nixosModules.wsl ]; };
|
||||
# nix build '.#nixosConfigurations.wsl-aarch.config.system.build.installer'
|
||||
"nixos-arm" = machine { name = "wsl"; system = "aarch64-linux"; channel = nixunstable; };
|
||||
"nixos-arm" = unstable { name = "wsl"; system = "aarch64-linux"; extraMods = [ wsl.nixosModules.wsl ]; };
|
||||
};
|
||||
|
||||
darwinConfigurations =
|
||||
|
||||
@@ -64,6 +64,7 @@ in rec {
|
||||
};
|
||||
kiwix-tools = super.callPackage ./kiwix-tools.nix {};
|
||||
libkiwix = super.callPackage ./libkiwix.nix {};
|
||||
zimlib = super.callPackage ./zimlib.nix {};
|
||||
|
||||
xonsh = super.xonsh.overridePythonAttrs (old: rec{
|
||||
python3 = self.gregpy;
|
||||
|
||||
@@ -13,15 +13,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kiwix-tools";
|
||||
version = "3.1.2";
|
||||
version = "3.4.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kiwix";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
# For 3.3.0
|
||||
#sha256 = "sha256-jeIyHTbgGrYknLaTNNSFVFo9zXyyGZU6dIVv49bEhBw=";
|
||||
sha256 = "sha256-i3wr0VZCeH3aRCgphIyn6U91Ja+qVT4NVAzJSmniu8o=";
|
||||
sha256 = "sha256-r3/aTH/YoDuYpKLPakP4toS3OtiRueTUjmR34rdmr+w=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libkiwix";
|
||||
version = "9.4.1";
|
||||
version = "12.0.0";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "kiwix";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-vE8bJrNx0oojTgcDhlr+SyfzdpigCZ0pQ2cPYaiZlgw=";
|
||||
sha256 = "sha256-4FxLxJxVhqbeNqX4vorHkROUuRURvE6AXlteIZCEBtc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -47,10 +47,10 @@ stdenv.mkDerivation rec {
|
||||
zlib
|
||||
];
|
||||
|
||||
mesonFlags = [ "--debug" ];
|
||||
mesonFlags = [ "--debug" "-Dc_args=-I${zimlib}/include/" ];
|
||||
|
||||
# Built-in python script uses /usr/bin/env
|
||||
patchPhase = "patchShebangs --build scripts/kiwix-compile-resources";
|
||||
patchPhase = "patchShebangs --build scripts/*";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Kiwix file library for use by other applications";
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, meson, ninja, pkg-config
|
||||
, python3
|
||||
, icu
|
||||
, libuuid
|
||||
, xapian
|
||||
, xz
|
||||
, zstd
|
||||
, gtest
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zimlib";
|
||||
version = "8.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "openzim";
|
||||
repo = "libzim";
|
||||
rev = version;
|
||||
sha256 = "sha256-ab7UUF+I0/xaGChvdjylEQRHLOjmtg/wk+/JEGehGLE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
pkg-config
|
||||
ninja
|
||||
python3
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
icu
|
||||
libuuid
|
||||
xapian
|
||||
xz
|
||||
zstd
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs scripts
|
||||
'';
|
||||
|
||||
mesonFlags = [ "-Dtest_data_dir=none" ];
|
||||
|
||||
checkInputs = [
|
||||
gtest
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library for reading and writing ZIM files";
|
||||
homepage = "https://www.openzim.org/wiki/Zimlib";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ ajs124 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user