mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-26 06:44:06 +00:00
Merge master into staging-next
This commit is contained in:
commit
e57c5a4ddc
@ -597,7 +597,7 @@ in
|
||||
PrivateMounts = true;
|
||||
# System Call Filtering
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = "~@clock @cpu-emulation @debug @keyring @memlock @module @mount @obsolete @raw-io @reboot @setuid @swap";
|
||||
SystemCallFilter = "~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @setuid @swap";
|
||||
};
|
||||
|
||||
environment = {
|
||||
|
@ -54,7 +54,7 @@ with lib;
|
||||
client.execute("echo 'sync_address = \"http://server:${toString testPort}\"' > ~/.config/atuin/config.toml")
|
||||
|
||||
# log in to atuin server on client node
|
||||
client.succeed(f"${atuin}/bin/atuin login -u ${testUser} -p ${testPass} -k {key}")
|
||||
client.succeed(f"${atuin}/bin/atuin login -u ${testUser} -p ${testPass} -k \"{key}\"")
|
||||
|
||||
# pull records from atuin server
|
||||
client.succeed("${atuin}/bin/atuin sync -f")
|
||||
|
@ -8,6 +8,21 @@ with import ../lib/testing-python.nix { inherit system pkgs; };
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
## gpg --faked-system-time='20230301T010000!' --quick-generate-key snakeoil ed25519 sign
|
||||
signingPrivateKey = ''
|
||||
-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||
|
||||
lFgEY/6jkBYJKwYBBAHaRw8BAQdADXiZRV8RJUyC9g0LH04wLMaJL9WTc+szbMi7
|
||||
5fw4yP8AAQCl8EwGfzSLm/P6fCBfA3I9znFb3MEHGCCJhJ6VtKYyRw7ktAhzbmFr
|
||||
ZW9pbIiUBBMWCgA8FiEE+wUM6VW/NLtAdSixTWQt6LZ4x50FAmP+o5ACGwMFCQPC
|
||||
ZwAECwkIBwQVCgkIBRYCAwEAAh4FAheAAAoJEE1kLei2eMedFTgBAKQs1oGFZrCI
|
||||
TZP42hmBTKxGAI1wg7VSdDEWTZxut/2JAQDGgo2sa4VHMfj0aqYGxrIwfP2B7JHO
|
||||
GCqGCRf9O/hzBA==
|
||||
=9Uy3
|
||||
-----END PGP PRIVATE KEY BLOCK-----
|
||||
'';
|
||||
signingPrivateKeyId = "4D642DE8B678C79D";
|
||||
|
||||
supportedDbTypes = [ "mysql" "postgres" "sqlite3" ];
|
||||
makeGiteaTest = type: nameValuePair type (makeTest {
|
||||
name = "${giteaPackage.pname}-${type}";
|
||||
@ -21,8 +36,9 @@ let
|
||||
database = { inherit type; };
|
||||
package = giteaPackage;
|
||||
settings.service.DISABLE_REGISTRATION = true;
|
||||
settings."repository.signing".SIGNING_KEY = signingPrivateKeyId;
|
||||
};
|
||||
environment.systemPackages = [ giteaPackage pkgs.jq ];
|
||||
environment.systemPackages = [ giteaPackage pkgs.gnupg pkgs.jq ];
|
||||
services.openssh.enable = true;
|
||||
};
|
||||
client1 = { config, pkgs, ... }: {
|
||||
@ -58,6 +74,13 @@ let
|
||||
server.wait_for_open_port(3000)
|
||||
server.succeed("curl --fail http://localhost:3000/")
|
||||
|
||||
server.succeed(
|
||||
"su -l gitea -c 'gpg --homedir /var/lib/gitea/data/home/.gnupg "
|
||||
+ "--import ${toString (pkgs.writeText "gitea.key" signingPrivateKey)}'"
|
||||
)
|
||||
|
||||
assert "BEGIN PGP PUBLIC KEY BLOCK" in server.succeed("curl http://localhost:3000/api/v1/signing-key.gpg")
|
||||
|
||||
server.succeed(
|
||||
"curl --fail http://localhost:3000/user/sign_up | grep 'Registration is disabled. "
|
||||
+ "Please contact your site administrator.'"
|
||||
|
@ -1,12 +1,12 @@
|
||||
{ lib, fetchFromGitHub }:
|
||||
rec {
|
||||
version = "9.0.1275";
|
||||
version = "9.0.1369";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vim";
|
||||
repo = "vim";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-WDnlYi9o2Kv/f3Fh1MHcfTlBTe1fxw4UyKJlKY04fyA=";
|
||||
hash = "sha256-2YjWd07RMyiITnuI3/L0D9MiAxl2+9QVT1nrMBA9/dI=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
@ -18,17 +18,17 @@ let
|
||||
archive_fmt = if stdenv.isDarwin then "zip" else "tar.gz";
|
||||
|
||||
sha256 = {
|
||||
x86_64-linux = "0661qkcljxdpi5f6cyfqr8vyf87p94amzdspcg8hjrz18j1adb0h";
|
||||
x86_64-darwin = "0781ad52vcqgam3iprm56kvcv5v12pba0i5spazr5zssnn3w3ym0";
|
||||
aarch64-linux = "0fwl12yngq3z2f18hp43q7nmnjdikly05q9rar9vcjc63h2pzfc5";
|
||||
aarch64-darwin = "1nldkg14zvk6nc72l50w4lv9k490vn34ms6z9x2b9zkx15d09v7x";
|
||||
armv7l-linux = "0mhriqi6hzn7wwfzl98dvcghkpkfa4rbbxvmyvzzc5ycgbs6r1mx";
|
||||
x86_64-linux = "00n7mykr8dyn9chiwsp0s8pk53c39by4wl0hyx1inb0zqxaszw25";
|
||||
x86_64-darwin = "1q41x23jbpisbwcxgmx18g0bcdsj5g1w3pbj9m6mxlssvbc2xiw6";
|
||||
aarch64-linux = "1kaj8g50m8imk34whf6sq41a2b1751mjqxvpwnprlx0i7xj2l832";
|
||||
aarch64-darwin = "1h6plmyv3xkkbpwka5rrkc1bdrgj9d8jp0q6qyhch368x8mp781m";
|
||||
armv7l-linux = "0q46nzhn8agsif9s50dbdbx6ds3ll39yp5lrp9n7y9a26m4cwjmv";
|
||||
}.${system} or throwSystem;
|
||||
in
|
||||
callPackage ./generic.nix rec {
|
||||
# Please backport all compatible updates to the stable release.
|
||||
# This is important for the extension ecosystem.
|
||||
version = "1.75.1";
|
||||
version = "1.76.0";
|
||||
pname = "vscode";
|
||||
|
||||
executableName = "code" + lib.optionalString isInsiders "-insiders";
|
||||
|
@ -1 +1 @@
|
||||
WGET_ARGS=( https://download.kde.org/stable/release-service/22.12.2/src -A '*.tar.xz' )
|
||||
WGET_ARGS=( https://download.kde.org/stable/release-service/22.12.3/src -A '*.tar.xz' )
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,18 +1,26 @@
|
||||
{ lib, stdenv, fetchzip
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchzip
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "widevine-cdm";
|
||||
version = "4.10.2449.0";
|
||||
version = "4.10.2557.0";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://dl.google.com/widevine-cdm/${version}-linux-x64.zip";
|
||||
sha256 = "sha256-f2kAkP+s3fB+krEZsiujEoI4oznkzSyaIB/CRJZWlXE=";
|
||||
hash = "sha256-XxTjuPjWy06SmHC6GaIVIp3zD76isCVATWwwdZljntE=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
install -vD libwidevinecdm.so $out/libwidevinecdm.so
|
||||
runHook preInstall
|
||||
|
||||
install -vD manifest.json $out/share/google/chrome/WidevineCdm/manifest.json
|
||||
install -vD LICENSE.txt $out/share/google/chrome/WidevineCdm/LICENSE.txt
|
||||
install -vD libwidevinecdm.so $out/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
@ -21,6 +29,6 @@ stdenv.mkDerivation rec {
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ jlamur ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ buildPythonApplication {
|
||||
--add-flags '--backend ${backend}'
|
||||
--set QUTE_QTWEBENGINE_VERSION_OVERRIDE "${lib.getVersion qtwebengine}"
|
||||
${lib.optionalString (pipewireSupport && backend == "webengine") ''--prefix LD_LIBRARY_PATH : ${libPath}''}
|
||||
${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/libwidevinecdm.so"''}
|
||||
${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"''}
|
||||
)
|
||||
'';
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
, wayland, pipewire
|
||||
, isSnapshot ? false
|
||||
, proprietaryCodecs ? false, vivaldi-ffmpeg-codecs ? null
|
||||
, enableWidevine ? false, vivaldi-widevine ? null
|
||||
, enableWidevine ? false, widevine-cdm ? null
|
||||
, commandLineArgs ? ""
|
||||
, pulseSupport ? stdenv.isLinux, libpulseaudio
|
||||
}:
|
||||
@ -95,7 +95,7 @@ in stdenv.mkDerivation rec {
|
||||
--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \
|
||||
${lib.optionalString enableWidevine "--suffix LD_LIBRARY_PATH : ${libPath}"}
|
||||
'' + lib.optionalString enableWidevine ''
|
||||
ln -sf ${vivaldi-widevine}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm
|
||||
ln -sf ${widevine-cdm}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm
|
||||
'' + ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
@ -1,28 +0,0 @@
|
||||
{ lib, stdenv, fetchzip
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "widevine";
|
||||
version = "4.10.2449.0";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://dl.google.com/widevine-cdm/${version}-linux-x64.zip";
|
||||
sha256 = "sha256-f2kAkP+s3fB+krEZsiujEoI4oznkzSyaIB/CRJZWlXE=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
install -vD manifest.json $out/share/google/chrome/WidevineCdm/manifest.json
|
||||
install -vD LICENSE.txt $out/share/google/chrome/WidevineCdm/LICENSE.txt
|
||||
install -vD libwidevinecdm.so $out/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Widevine support for Vivaldi";
|
||||
homepage = "https://www.widevine.com";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ betaboon ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
@ -6,13 +6,13 @@
|
||||
|
||||
let
|
||||
pname = "trilium-desktop";
|
||||
version = "0.58.8";
|
||||
version = "0.59.1";
|
||||
|
||||
linuxSource.url = "https://github.com/zadam/trilium/releases/download/v${version}/trilium-linux-x64-${version}.tar.xz";
|
||||
linuxSource.sha256 = "03v4a135brj2z1gj2y611pi7szfhr62xxj0qhki0mychypvdfx7i";
|
||||
linuxSource.sha256 = "04jmpz8riz71vzs13yy0prwfq3sji36n7mgap80q2xwx445bxrka";
|
||||
|
||||
darwinSource.url = "https://github.com/zadam/trilium/releases/download/v${version}/trilium-mac-x64-${version}.zip";
|
||||
darwinSource.sha256 = "0ncf2cl62hn2ja72fw10s40rzkgcwy77ggs29zpgjjlp9hkk3v8q";
|
||||
darwinSource.sha256 = "014phlv5mkn5pzbr9gwgy87d57wnkxa6g0pi3k2d4d29fj9v1f44";
|
||||
|
||||
meta = metaCommon // {
|
||||
mainProgram = "trilium";
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
let
|
||||
serverSource.url = "https://github.com/zadam/trilium/releases/download/v${version}/trilium-linux-x64-server-${version}.tar.xz";
|
||||
serverSource.sha256 = "0mkbmb26y99rc22bpxlc3gdgv84rj7wvsva741gw2z0cb3jh4ziv";
|
||||
version = "0.58.8";
|
||||
serverSource.sha256 = "073hxqszd6sh2fcczs8c1sgby0pg97d3h99rjdrj7y2j85hflp5a";
|
||||
version = "0.59.1";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "trilium-server";
|
||||
inherit version;
|
||||
|
@ -1,7 +1,39 @@
|
||||
{ stdenv, lib, fetchFromGitHub, makeDesktopItem, cmake, pkg-config
|
||||
, freefont_ttf, spice-protocol, nettle, libbfd, fontconfig, libffi, expat
|
||||
, libxkbcommon, libGL, libXext, libXrandr, libXi, libXScrnSaver, libXinerama
|
||||
, libXcursor, libXpresent, wayland, wayland-protocols
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, makeDesktopItem
|
||||
, pkg-config
|
||||
, cmake
|
||||
, freefont_ttf
|
||||
, spice-protocol
|
||||
, nettle
|
||||
, libbfd
|
||||
, fontconfig
|
||||
, libffi
|
||||
, expat
|
||||
, libGL
|
||||
|
||||
, libX11
|
||||
, libxkbcommon
|
||||
, libXext
|
||||
, libXrandr
|
||||
, libXi
|
||||
, libXScrnSaver
|
||||
, libXinerama
|
||||
, libXcursor
|
||||
, libXpresent
|
||||
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
|
||||
, pipewire
|
||||
, pulseaudio
|
||||
, libsamplerate
|
||||
|
||||
, xorgSupport ? true
|
||||
, waylandSupport ? true
|
||||
, pipewireSupport ? true
|
||||
, pulseSupport ? true
|
||||
}:
|
||||
|
||||
let
|
||||
@ -16,40 +48,30 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "looking-glass-client";
|
||||
version = "B5.0.1";
|
||||
version = "B6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnif";
|
||||
repo = "LookingGlass";
|
||||
rev = version;
|
||||
sha256 = "sha256-UzZQU5SzJ2mo9QBweQB0VJSnKfzgTG5QaKpIQN/6LCE=";
|
||||
sha256 = "sha256-6vYbNmNJBCoU23nVculac24tHqH7F4AZVftIjL93WJU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
libGL
|
||||
freefont_ttf
|
||||
spice-protocol
|
||||
expat
|
||||
libbfd
|
||||
nettle
|
||||
fontconfig
|
||||
libffi
|
||||
libxkbcommon
|
||||
libXi
|
||||
libXScrnSaver
|
||||
libXinerama
|
||||
libXcursor
|
||||
libXpresent
|
||||
libXext
|
||||
libXrandr
|
||||
wayland
|
||||
wayland-protocols
|
||||
];
|
||||
buildInputs = [ libGL libX11 freefont_ttf spice-protocol expat libbfd nettle fontconfig libffi ]
|
||||
++ lib.optionals xorgSupport [ libxkbcommon libXi libXScrnSaver libXinerama libXcursor libXpresent libXext libXrandr ]
|
||||
++ lib.optionals waylandSupport [ libxkbcommon wayland wayland-protocols ]
|
||||
++ lib.optionals pipewireSupport [ pipewire libsamplerate ]
|
||||
++ lib.optionals pulseSupport [ pulseaudio libsamplerate ];
|
||||
|
||||
cmakeFlags = [ "-DOPTIMIZE_FOR_NATIVE=OFF" ]
|
||||
++ lib.optional (!xorgSupport) "-DENABLE_X11=no"
|
||||
++ lib.optional (!waylandSupport) "-DENABLE_WAYLAND=no"
|
||||
++ lib.optional (!pulseSupport) "-DENABLE_PULSEAUDIO=no"
|
||||
++ lib.optional (!pipewireSupport) "-DENABLE_PIPEWIRE=no";
|
||||
|
||||
cmakeFlags = [ "-DOPTIMIZE_FOR_NATIVE=OFF" ];
|
||||
|
||||
postUnpack = ''
|
||||
echo ${src.rev} > source/VERSION
|
||||
@ -73,7 +95,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
homepage = "https://looking-glass.io/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ alexbakker babbaj ];
|
||||
maintainers = with maintainers; [ alexbakker babbaj j-brn ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ runCommand, nix, lib }:
|
||||
{ runCommandLocal, nix, lib }:
|
||||
|
||||
# Replace a single dependency in the requisites tree of drv, propagating
|
||||
# the change all the way up the tree, without a full rebuild. This can be
|
||||
@ -23,7 +23,7 @@ with lib;
|
||||
|
||||
let
|
||||
warn = if verbose then builtins.trace else (x: y: y);
|
||||
references = import (runCommand "references.nix" { exportReferencesGraph = [ "graph" drv ]; } ''
|
||||
references = import (runCommandLocal "references.nix" { exportReferencesGraph = [ "graph" drv ]; } ''
|
||||
(echo {
|
||||
while read path
|
||||
do
|
||||
@ -61,7 +61,7 @@ let
|
||||
drvName = drv:
|
||||
discard (substring 33 (stringLength (builtins.baseNameOf drv)) (builtins.baseNameOf drv));
|
||||
|
||||
rewriteHashes = drv: hashes: runCommand (drvName drv) { nixStore = "${nix.out}/bin/nix-store"; } ''
|
||||
rewriteHashes = drv: hashes: runCommandLocal (drvName drv) { nixStore = "${nix.out}/bin/nix-store"; } ''
|
||||
$nixStore --dump ${drv} | sed 's|${baseNameOf drv}|'$(basename $out)'|g' | sed -e ${
|
||||
concatStringsSep " -e " (mapAttrsToList (name: value:
|
||||
"'s|${baseNameOf name}|${baseNameOf value}|g'"
|
||||
|
@ -86,25 +86,7 @@ stdenv.mkDerivation {
|
||||
../../common/compiler-rt/darwin-plistbuddy-workaround.patch
|
||||
# See: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
|
||||
./armv7l.patch
|
||||
]
|
||||
# The `compiler-rt` build inspects `ld` to figure out whether it needs to
|
||||
# explicitly call `codesign`:
|
||||
# https://github.com/llvm/llvm-project/blob/27ef42bec80b6c010b7b3729ed0528619521a690/compiler-rt/cmake/Modules/AddCompilerRT.cmake#L409-L422
|
||||
#
|
||||
# In our case, despite (currently) having an `ld` version than 609, we don't
|
||||
# need an explicit codesigning step because `postLinkSignHook` handles this
|
||||
# for us.
|
||||
#
|
||||
# Unfortunately there isn't an easy way to override
|
||||
# `NEED_EXPLICIT_ADHOC_CODESIGN`.
|
||||
#
|
||||
# Adding `codesign` as a build input also doesn't currently work because, as
|
||||
# of this writing, `codesign` in nixpkgs doesn't support the `--sign` alias
|
||||
# which the `compiler-rt` build uses. See here for context:
|
||||
# https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272116014
|
||||
#
|
||||
# So, for now, we patch `compiler-rt` to skip the explicit codesigning step.
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin ./skip-explicit-codesign.patch;
|
||||
];
|
||||
|
||||
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
|
||||
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
|
||||
--- a/cmake/Modules/AddCompilerRT.cmake
|
||||
+++ b/cmake/Modules/AddCompilerRT.cmake
|
||||
@@ -406,7 +406,7 @@ function(add_compiler_rt_runtime name type)
|
||||
if (HAD_ERROR)
|
||||
message(FATAL_ERROR "${CMAKE_LINKER} failed with status ${HAD_ERROR}")
|
||||
endif()
|
||||
- set(NEED_EXPLICIT_ADHOC_CODESIGN 1)
|
||||
+ set(NEED_EXPLICIT_ADHOC_CODESIGN 0) # `postLinkSignHook` handles this for us
|
||||
if ("${LD_V_OUTPUT}" MATCHES ".*ld64-([0-9.]+).*")
|
||||
string(REGEX REPLACE ".*ld64-([0-9.]+).*" "\\1" HOST_LINK_VERSION ${LD_V_OUTPUT})
|
||||
if (HOST_LINK_VERSION VERSION_GREATER_EQUAL 609)
|
@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
|
||||
description = "Library for reading and writing Jcat files";
|
||||
homepage = "https://github.com/hughsie/libjcat";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
|
||||
description = "A library to help create and query binary XML blobs";
|
||||
homepage = "https://github.com/hughsie/libxmlb";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tkrzw";
|
||||
version = "1.0.24";
|
||||
version = "1.0.26";
|
||||
# TODO: defeat multi-output reference cycles
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dbmx.net/tkrzw/pkg/tkrzw-${version}.tar.gz";
|
||||
hash = "sha256-G7SVKgU4b8I5iwAlGHL/w8z0fhI+Awe3V6aqFsOnUrA=";
|
||||
hash = "sha256-vbuzV4ZZnb0Vl+U9B8BorDD7mHQ7ILwkR35GaFs+aTI=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -28,6 +28,7 @@
|
||||
, ninja
|
||||
, gcab
|
||||
, gnutls
|
||||
, pandoc
|
||||
, protobufc
|
||||
, python3
|
||||
, wrapGAppsNoGuiHook
|
||||
@ -79,12 +80,19 @@ let
|
||||
# Experimental
|
||||
haveFlashrom = isx86 && enableFlashrom;
|
||||
|
||||
runPythonCommand = name: buildCommandPython: runCommand name {
|
||||
nativeBuildInputs = [ python3 ];
|
||||
inherit buildCommandPython;
|
||||
} ''
|
||||
exec python3 -c "$buildCommandPython"
|
||||
'';
|
||||
runPythonCommand =
|
||||
name:
|
||||
buildCommandPython:
|
||||
|
||||
runCommand
|
||||
name
|
||||
{
|
||||
nativeBuildInputs = [ python3 ];
|
||||
inherit buildCommandPython;
|
||||
}
|
||||
''
|
||||
exec python3 -c "$buildCommandPython"
|
||||
'';
|
||||
|
||||
test-firmware =
|
||||
let
|
||||
@ -103,205 +111,219 @@ let
|
||||
};
|
||||
};
|
||||
in
|
||||
src // {
|
||||
meta = src.meta // {
|
||||
# For update script
|
||||
position =
|
||||
let
|
||||
pos = builtins.unsafeGetAttrPos "updateScript" test-firmware;
|
||||
in
|
||||
pos.file + ":" + toString pos.line;
|
||||
};
|
||||
src // {
|
||||
meta = src.meta // {
|
||||
# For update script
|
||||
position =
|
||||
let
|
||||
pos = builtins.unsafeGetAttrPos "updateScript" test-firmware;
|
||||
in
|
||||
pos.file + ":" + toString pos.line;
|
||||
};
|
||||
|
||||
|
||||
self = stdenv.mkDerivation rec {
|
||||
pname = "fwupd";
|
||||
version = "1.8.10";
|
||||
|
||||
# libfwupd goes to lib
|
||||
# daemon, plug-ins and libfwupdplugin go to out
|
||||
# CLI programs go to out
|
||||
outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
|
||||
hash = "sha256-vvNUidNdhW9xeksjEVnkIR7CZ4oBQizZJRMFtZUq6Ow=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "fwupd";
|
||||
version = "1.8.12";
|
||||
|
||||
patches = [
|
||||
# Since /etc is the domain of NixOS, not Nix,
|
||||
# we cannot install files there.
|
||||
# Let’s install the files to $prefix/etc
|
||||
# while still reading them from /etc.
|
||||
# NixOS module for fwupd will take take care of copying the files appropriately.
|
||||
./add-option-for-installation-sysconfdir.patch
|
||||
# libfwupd goes to lib
|
||||
# daemon, plug-ins and libfwupdplugin go to out
|
||||
# CLI programs go to out
|
||||
outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ];
|
||||
|
||||
# Install plug-ins and libfwupdplugin to $out output,
|
||||
# they are not really part of the library.
|
||||
./install-fwupdplugin-to-out.patch
|
||||
src = fetchFromGitHub {
|
||||
owner = "fwupd";
|
||||
repo = "fwupd";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-a4F7skyukl4jW3apGi1ie/EcuGlkZoszyZdtLFuJewA=";
|
||||
};
|
||||
|
||||
# Installed tests are installed to different output
|
||||
# we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle.
|
||||
./installed-tests-path.patch
|
||||
patches = [
|
||||
# Since /etc is the domain of NixOS, not Nix,
|
||||
# we cannot install files there.
|
||||
# Let’s install the files to $prefix/etc
|
||||
# while still reading them from /etc.
|
||||
# NixOS module for fwupd will take take care of copying the files appropriately.
|
||||
./add-option-for-installation-sysconfdir.patch
|
||||
|
||||
# EFI capsule is located in fwupd-efi now.
|
||||
./efi-app-path.patch
|
||||
];
|
||||
# Install plug-ins and libfwupdplugin to $out output,
|
||||
# they are not really part of the library.
|
||||
./install-fwupdplugin-to-out.patch
|
||||
|
||||
nativeBuildInputs = [
|
||||
# required for firmware zipping
|
||||
ensureNewerSourcesForZipFilesHook
|
||||
meson
|
||||
ninja
|
||||
gi-docgen
|
||||
pkg-config
|
||||
gobject-introspection
|
||||
gettext
|
||||
shared-mime-info
|
||||
valgrind
|
||||
gcab
|
||||
gnutls
|
||||
protobufc # for protoc
|
||||
python
|
||||
wrapGAppsNoGuiHook
|
||||
vala
|
||||
];
|
||||
# Installed tests are installed to different output
|
||||
# we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle.
|
||||
./installed-tests-path.patch
|
||||
|
||||
buildInputs = [
|
||||
polkit
|
||||
libxmlb
|
||||
gusb
|
||||
sqlite
|
||||
libarchive
|
||||
curl
|
||||
elfutils
|
||||
libgudev
|
||||
colord
|
||||
libjcat
|
||||
libuuid
|
||||
json-glib
|
||||
umockdev
|
||||
bash-completion
|
||||
pango
|
||||
tpm2-tss
|
||||
efivar
|
||||
fwupd-efi
|
||||
protobufc
|
||||
modemmanager
|
||||
libmbim
|
||||
libcbor
|
||||
libqmi
|
||||
xz # for liblzma
|
||||
] ++ lib.optionals haveDell [
|
||||
libsmbios
|
||||
] ++ lib.optionals haveFlashrom [
|
||||
flashrom
|
||||
];
|
||||
# EFI capsule is located in fwupd-efi now.
|
||||
./efi-app-path.patch
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddocs=enabled"
|
||||
"-Dplugin_dummy=true"
|
||||
# We are building the official releases.
|
||||
"-Dsupported_build=enabled"
|
||||
# Would dlopen libsoup to preserve compatibility with clients linking against older fwupd.
|
||||
# https://github.com/fwupd/fwupd/commit/173d389fa59d8db152a5b9da7cc1171586639c97
|
||||
"-Dsoup_session_compat=false"
|
||||
"-Dudevdir=lib/udev"
|
||||
"-Dsystemd_root_prefix=${placeholder "out"}"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
||||
"-Defi_os_dir=nixos"
|
||||
"-Dplugin_modem_manager=enabled"
|
||||
nativeBuildInputs = [
|
||||
# required for firmware zipping
|
||||
ensureNewerSourcesForZipFilesHook
|
||||
meson
|
||||
ninja
|
||||
gi-docgen
|
||||
pkg-config
|
||||
gobject-introspection
|
||||
gettext
|
||||
shared-mime-info
|
||||
valgrind
|
||||
gcab
|
||||
gnutls
|
||||
pandoc
|
||||
protobufc # for protoc
|
||||
python
|
||||
wrapGAppsNoGuiHook
|
||||
vala
|
||||
];
|
||||
|
||||
# We do not want to place the daemon into lib (cyclic reference)
|
||||
"--libexecdir=${placeholder "out"}/libexec"
|
||||
] ++ lib.optionals (!haveDell) [
|
||||
"-Dplugin_dell=disabled"
|
||||
"-Dplugin_synaptics_mst=disabled"
|
||||
] ++ lib.optionals (!haveRedfish) [
|
||||
"-Dplugin_redfish=disabled"
|
||||
] ++ lib.optionals (!haveFlashrom) [
|
||||
"-Dplugin_flashrom=disabled"
|
||||
] ++ lib.optionals (!haveMSR) [
|
||||
"-Dplugin_msr=disabled"
|
||||
];
|
||||
buildInputs = [
|
||||
polkit
|
||||
libxmlb
|
||||
gusb
|
||||
sqlite
|
||||
libarchive
|
||||
curl
|
||||
elfutils
|
||||
libgudev
|
||||
colord
|
||||
libjcat
|
||||
libuuid
|
||||
json-glib
|
||||
umockdev
|
||||
bash-completion
|
||||
pango
|
||||
tpm2-tss
|
||||
efivar
|
||||
fwupd-efi
|
||||
protobufc
|
||||
modemmanager
|
||||
libmbim
|
||||
libcbor
|
||||
libqmi
|
||||
xz # for liblzma
|
||||
] ++ lib.optionals haveDell [
|
||||
libsmbios
|
||||
] ++ lib.optionals haveFlashrom [
|
||||
flashrom
|
||||
];
|
||||
|
||||
# TODO: wrapGAppsHook wraps efi capsule even though it is not ELF
|
||||
dontWrapGApps = true;
|
||||
mesonFlags = [
|
||||
"-Ddocs=enabled"
|
||||
"-Dplugin_dummy=true"
|
||||
# We are building the official releases.
|
||||
"-Dsupported_build=enabled"
|
||||
# Would dlopen libsoup to preserve compatibility with clients linking against older fwupd.
|
||||
# https://github.com/fwupd/fwupd/commit/173d389fa59d8db152a5b9da7cc1171586639c97
|
||||
"-Dsoup_session_compat=false"
|
||||
"-Dudevdir=lib/udev"
|
||||
"-Dsystemd_root_prefix=${placeholder "out"}"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
||||
"-Defi_os_dir=nixos"
|
||||
"-Dplugin_modem_manager=enabled"
|
||||
|
||||
doCheck = true;
|
||||
# We do not want to place the daemon into lib (cyclic reference)
|
||||
"--libexecdir=${placeholder "out"}/libexec"
|
||||
] ++ lib.optionals (!haveDell) [
|
||||
"-Dplugin_dell=disabled"
|
||||
"-Dplugin_synaptics_mst=disabled"
|
||||
] ++ lib.optionals (!haveRedfish) [
|
||||
"-Dplugin_redfish=disabled"
|
||||
] ++ lib.optionals (!haveFlashrom) [
|
||||
"-Dplugin_flashrom=disabled"
|
||||
] ++ lib.optionals (!haveMSR) [
|
||||
"-Dplugin_msr=disabled"
|
||||
];
|
||||
|
||||
# Environment variables
|
||||
# TODO: wrapGAppsHook wraps efi capsule even though it is not ELF
|
||||
dontWrapGApps = true;
|
||||
|
||||
# Fontconfig error: Cannot load default config file
|
||||
FONTCONFIG_FILE =
|
||||
let
|
||||
fontsConf = makeFontsConf {
|
||||
fontDirectories = [ freefont_ttf ];
|
||||
};
|
||||
in fontsConf;
|
||||
doCheck = true;
|
||||
|
||||
# error: “PolicyKit files are missing”
|
||||
# https://github.com/NixOS/nixpkgs/pull/67625#issuecomment-525788428
|
||||
PKG_CONFIG_POLKIT_GOBJECT_1_ACTIONDIR = "/run/current-system/sw/share/polkit-1/actions";
|
||||
# Environment variables
|
||||
|
||||
# Phase hooks
|
||||
# Fontconfig error: Cannot load default config file
|
||||
FONTCONFIG_FILE =
|
||||
let
|
||||
fontsConf = makeFontsConf {
|
||||
fontDirectories = [ freefont_ttf ];
|
||||
};
|
||||
in
|
||||
fontsConf;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs \
|
||||
contrib/generate-version-script.py \
|
||||
po/test-deps
|
||||
# error: “PolicyKit files are missing”
|
||||
# https://github.com/NixOS/nixpkgs/pull/67625#issuecomment-525788428
|
||||
PKG_CONFIG_POLKIT_GOBJECT_1_ACTIONDIR = "/run/current-system/sw/share/polkit-1/actions";
|
||||
|
||||
substituteInPlace data/installed-tests/fwupdmgr-p2p.sh \
|
||||
--replace "gdbus" ${glib.bin}/bin/gdbus
|
||||
# Phase hooks
|
||||
|
||||
# tests fail with: Failed to load SMBIOS: neither SMBIOS or DT found
|
||||
sed -i 's/test(.*)//' plugins/lenovo-thinklmi/meson.build
|
||||
sed -i 's/test(.*)//' plugins/mtd/meson.build
|
||||
# fails on amd cpu
|
||||
sed -i 's/test(.*)//' libfwupdplugin/meson.build
|
||||
# in nixos test tries to chmod 0777 $out/share/installed-tests/fwupd/tests/redfish.conf
|
||||
sed -i "s/get_option('tests')/false/" plugins/redfish/meson.build
|
||||
'';
|
||||
postPatch = ''
|
||||
patchShebangs \
|
||||
contrib/generate-version-script.py \
|
||||
po/test-deps
|
||||
|
||||
preBuild = ''
|
||||
# jcat-tool at buildtime requires a home directory
|
||||
export HOME="$(mktemp -d)"
|
||||
'';
|
||||
substituteInPlace data/installed-tests/fwupdmgr-p2p.sh \
|
||||
--replace "gdbus" ${glib.bin}/bin/gdbus
|
||||
|
||||
preCheck = ''
|
||||
addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share"
|
||||
# tests fail with: Failed to load SMBIOS: neither SMBIOS or DT found
|
||||
sed -i 's/test(.*)//' plugins/lenovo-thinklmi/meson.build
|
||||
sed -i 's/test(.*)//' plugins/mtd/meson.build
|
||||
# fails on amd cpu
|
||||
sed -i 's/test(.*)//' libfwupdplugin/meson.build
|
||||
# in nixos test tries to chmod 0777 $out/share/installed-tests/fwupd/tests/redfish.conf
|
||||
sed -i "s/get_option('tests')/false/" plugins/redfish/meson.build
|
||||
|
||||
echo "12345678901234567890123456789012" > machine-id
|
||||
export NIX_REDIRECTS=/etc/machine-id=$(realpath machine-id) \
|
||||
LD_PRELOAD=${libredirect}/lib/libredirect.so
|
||||
'';
|
||||
# Device tests use device emulation and need to download emulation data from
|
||||
# the internet, which does not work on our test VMs.
|
||||
# It's probably better to disable these tests for NixOS by setting
|
||||
# the device-tests directory to /dev/null.
|
||||
# For more info on device emulation, see:
|
||||
# https://github.com/fwupd/fwupd/blob/eeeac4e9ba8a6513428b456a551bffd95d533e50/docs/device-emulation.md
|
||||
substituteInPlace data/installed-tests/meson.build \
|
||||
--replace "join_paths(datadir, 'fwupd', 'device-tests')" "'/dev/null'"
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
# We have pkexec on PATH so Meson will try to use it when installation fails
|
||||
# due to being unable to write to e.g. /etc.
|
||||
# Let’s pretend we already ran pkexec –
|
||||
# the pkexec on PATH would complain it lacks setuid bit,
|
||||
# obscuring the underlying error.
|
||||
# https://github.com/mesonbuild/meson/blob/492cc9bf95d573e037155b588dc5110ded4d9a35/mesonbuild/minstall.py#L558
|
||||
export PKEXEC_UID=-1
|
||||
'';
|
||||
preBuild = ''
|
||||
# jcat-tool at buildtime requires a home directory
|
||||
export HOME="$(mktemp -d)"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# These files have weird licenses so they are shipped separately.
|
||||
cp --recursive --dereference "${test-firmware}/installed-tests/tests" "$installedTests/libexec/installed-tests/fwupd"
|
||||
'';
|
||||
preCheck = ''
|
||||
addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share"
|
||||
|
||||
preFixup = let
|
||||
echo "12345678901234567890123456789012" > machine-id
|
||||
export NIX_REDIRECTS=/etc/machine-id=$(realpath machine-id) \
|
||||
LD_PRELOAD=${libredirect}/lib/libredirect.so
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
# We have pkexec on PATH so Meson will try to use it when installation fails
|
||||
# due to being unable to write to e.g. /etc.
|
||||
# Let’s pretend we already ran pkexec –
|
||||
# the pkexec on PATH would complain it lacks setuid bit,
|
||||
# obscuring the underlying error.
|
||||
# https://github.com/mesonbuild/meson/blob/492cc9bf95d573e037155b588dc5110ded4d9a35/mesonbuild/minstall.py#L558
|
||||
export PKEXEC_UID=-1
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# These files have weird licenses so they are shipped separately.
|
||||
cp --recursive --dereference "${test-firmware}/installed-tests/tests" "$installedTests/libexec/installed-tests/fwupd"
|
||||
'';
|
||||
|
||||
preFixup =
|
||||
let
|
||||
binPath = [
|
||||
efibootmgr
|
||||
bubblewrap
|
||||
tpm2-tools
|
||||
];
|
||||
in ''
|
||||
in
|
||||
''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
||||
# See programs reached with fu_common_find_program_in_path in source
|
||||
@ -309,60 +331,62 @@ let
|
||||
)
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Since we had to disable wrapGAppsHook, we need to wrap the executables manually.
|
||||
find -L "$out/bin" "$out/libexec" -type f -executable -print0 \
|
||||
| while IFS= read -r -d ''' file; do
|
||||
if [[ "$file" != *.efi ]]; then
|
||||
echo "Wrapping program $file"
|
||||
wrapGApp "$file"
|
||||
fi
|
||||
done
|
||||
postFixup = ''
|
||||
# Since we had to disable wrapGAppsHook, we need to wrap the executables manually.
|
||||
find -L "$out/bin" "$out/libexec" -type f -executable -print0 \
|
||||
| while IFS= read -r -d ''' file; do
|
||||
if [[ "$file" != *.efi ]]; then
|
||||
echo "Wrapping program $file"
|
||||
wrapGApp "$file"
|
||||
fi
|
||||
done
|
||||
|
||||
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
||||
moveToOutput "share/doc" "$devdoc"
|
||||
'';
|
||||
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
|
||||
moveToOutput "share/doc" "$devdoc"
|
||||
'';
|
||||
|
||||
separateDebugInfo = true;
|
||||
separateDebugInfo = true;
|
||||
|
||||
passthru = {
|
||||
filesInstalledToEtc = [
|
||||
"fwupd/bios-settings.d/README.md"
|
||||
"fwupd/daemon.conf"
|
||||
"fwupd/remotes.d/lvfs-testing.conf"
|
||||
"fwupd/remotes.d/lvfs.conf"
|
||||
"fwupd/remotes.d/vendor.conf"
|
||||
"fwupd/remotes.d/vendor-directory.conf"
|
||||
"fwupd/uefi_capsule.conf"
|
||||
"pki/fwupd/GPG-KEY-Linux-Foundation-Firmware"
|
||||
"pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service"
|
||||
"pki/fwupd/LVFS-CA.pem"
|
||||
"pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata"
|
||||
"pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service"
|
||||
"pki/fwupd-metadata/LVFS-CA.pem"
|
||||
"grub.d/35_fwupd"
|
||||
] ++ lib.optionals haveDell [
|
||||
"fwupd/remotes.d/dell-esrt.conf"
|
||||
] ++ lib.optionals haveRedfish [
|
||||
"fwupd/redfish.conf"
|
||||
] ++ lib.optionals haveMSR [
|
||||
"fwupd/msr.conf"
|
||||
] ++ lib.optionals isx86 [
|
||||
"fwupd/thunderbolt.conf"
|
||||
];
|
||||
passthru = {
|
||||
filesInstalledToEtc = [
|
||||
"fwupd/bios-settings.d/README.md"
|
||||
"fwupd/daemon.conf"
|
||||
"fwupd/remotes.d/lvfs-testing.conf"
|
||||
"fwupd/remotes.d/lvfs.conf"
|
||||
"fwupd/remotes.d/vendor.conf"
|
||||
"fwupd/remotes.d/vendor-directory.conf"
|
||||
"fwupd/uefi_capsule.conf"
|
||||
"pki/fwupd/GPG-KEY-Linux-Foundation-Firmware"
|
||||
"pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service"
|
||||
"pki/fwupd/LVFS-CA.pem"
|
||||
"pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata"
|
||||
"pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service"
|
||||
"pki/fwupd-metadata/LVFS-CA.pem"
|
||||
"grub.d/35_fwupd"
|
||||
] ++ lib.optionals haveDell [
|
||||
"fwupd/remotes.d/dell-esrt.conf"
|
||||
] ++ lib.optionals haveRedfish [
|
||||
"fwupd/redfish.conf"
|
||||
] ++ lib.optionals haveMSR [
|
||||
"fwupd/msr.conf"
|
||||
] ++ lib.optionals isx86 [
|
||||
"fwupd/thunderbolt.conf"
|
||||
];
|
||||
|
||||
# DisabledPlugins key in fwupd/daemon.conf
|
||||
defaultDisabledPlugins = [
|
||||
"test"
|
||||
"test_ble"
|
||||
];
|
||||
# DisabledPlugins key in fwupd/daemon.conf
|
||||
defaultDisabledPlugins = [
|
||||
"test"
|
||||
"test_ble"
|
||||
];
|
||||
|
||||
# For updating.
|
||||
inherit test-firmware;
|
||||
# For updating.
|
||||
inherit test-firmware;
|
||||
|
||||
tests = let
|
||||
tests =
|
||||
let
|
||||
listToPy = list: "[${lib.concatMapStringsSep ", " (f: "'${f}'") list}]";
|
||||
in {
|
||||
in
|
||||
{
|
||||
installedTests = nixosTests.installed-tests.fwupd;
|
||||
|
||||
passthruMatches = runPythonCommand "fwupd-test-passthru-matches" ''
|
||||
@ -371,29 +395,27 @@ let
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
etc = '${self}/etc'
|
||||
etc = '${finalAttrs.finalPackage}/etc'
|
||||
package_etc = set(itertools.chain.from_iterable([[os.path.relpath(os.path.join(prefix, file), etc) for file in files] for (prefix, dirs, files) in os.walk(etc)]))
|
||||
passthru_etc = set(${listToPy passthru.filesInstalledToEtc})
|
||||
passthru_etc = set(${listToPy finalAttrs.passthru.filesInstalledToEtc})
|
||||
assert len(package_etc - passthru_etc) == 0, f'fwupd package contains the following paths in /etc that are not listed in passthru.filesInstalledToEtc: {package_etc - passthru_etc}'
|
||||
assert len(passthru_etc - package_etc) == 0, f'fwupd package lists the following paths in passthru.filesInstalledToEtc that are not contained in /etc: {passthru_etc - package_etc}'
|
||||
|
||||
config = configparser.RawConfigParser()
|
||||
config.read('${self}/etc/fwupd/daemon.conf')
|
||||
config.read('${finalAttrs.finalPackage}/etc/fwupd/daemon.conf')
|
||||
package_disabled_plugins = config.get('fwupd', 'DisabledPlugins').rstrip(';').split(';')
|
||||
passthru_disabled_plugins = ${listToPy passthru.defaultDisabledPlugins}
|
||||
passthru_disabled_plugins = ${listToPy finalAttrs.passthru.defaultDisabledPlugins}
|
||||
assert package_disabled_plugins == passthru_disabled_plugins, f'Default disabled plug-ins in the package {package_disabled_plugins} do not match those listed in passthru.defaultDisabledPlugins {passthru_disabled_plugins}'
|
||||
|
||||
pathlib.Path(os.getenv('out')).touch()
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://fwupd.org/";
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
|
||||
in self
|
||||
meta = with lib; {
|
||||
homepage = "https://fwupd.org/";
|
||||
maintainers = with maintainers; [ ];
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, kernel, kmod, looking-glass-client }:
|
||||
{ lib, stdenv, fetchFromGitHub, kernel, kmod, looking-glass-client }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kvmfr";
|
||||
@ -9,19 +9,6 @@ stdenv.mkDerivation rec {
|
||||
hardeningDisable = [ "pic" "format" ];
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
patches = lib.optional (kernel.kernelAtLeast "5.16") (fetchpatch {
|
||||
name = "kvmfr-5.16.patch";
|
||||
url = "https://github.com/gnif/LookingGlass/commit/a9b5302a517e19d7a2da114acf71ef1e69cfb497.patch";
|
||||
sha256 = "017nxlk2f7kyjp6llwa74dbczdb1jk8v791qld81dxhzkm9dyqqx";
|
||||
stripLen = 1;
|
||||
})
|
||||
++ lib.optional (kernel.kernelAtLeast "5.18") (fetchpatch {
|
||||
name = "kvmfr-5.18.patch";
|
||||
url = "https://github.com/gnif/LookingGlass/commit/c7029f95042fe902843cb6acbfc75889e93dc210.patch";
|
||||
sha256 = "sha256-6DpL17XWj8BKpiBdKdCPC51MWKLIo6PixQ9UaygT2Zg=";
|
||||
stripLen = 1;
|
||||
});
|
||||
|
||||
makeFlags = [
|
||||
"KVER=${kernel.modDirVersion}"
|
||||
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "grafana";
|
||||
version = "9.3.6";
|
||||
version = "9.4.2";
|
||||
|
||||
excludedPackages = [ "alert_webhook_listener" "clean-swagger" "release_publisher" "slow_proxy" "slow_proxy_mac" "macaron" "devenv" ];
|
||||
|
||||
@ -10,15 +10,15 @@ buildGoModule rec {
|
||||
rev = "v${version}";
|
||||
owner = "grafana";
|
||||
repo = "grafana";
|
||||
sha256 = "sha256-7t30AvGtCyU02fOYWHYcMWgcnmkepUpZzUMR4NjIlvw=";
|
||||
sha256 = "sha256-dSKIQiav6y4P1e/7CptIdRuOrDdXdvItCaRBcbepadE=";
|
||||
};
|
||||
|
||||
srcStatic = fetchurl {
|
||||
url = "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz";
|
||||
sha256 = "sha256-jRUPrb6ocqux4SrMm/Hw/2DuG7sj2jKhSln16ynjHwM=";
|
||||
sha256 = "sha256-dBp6V5ozu1koSoXIecjysSIdG0hL1K5lH9Z8yougUKo=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-uGJ3D14qAvDkBUIlNxF1pCHMDYeuUoM8tPWfoEvA5o4=";
|
||||
vendorSha256 = "sha256-atnlEdGDiUqQkslvRlPSi6VC5rEvRVV6R2Wxur3geew=";
|
||||
|
||||
nativeBuildInputs = [ wire ];
|
||||
|
||||
@ -28,8 +28,14 @@ buildGoModule rec {
|
||||
wire gen -tags oss ./pkg/server
|
||||
wire gen -tags oss ./pkg/cmd/grafana-cli/runner
|
||||
|
||||
GOARCH= CGO_ENABLED=0 go generate ./pkg/framework/coremodel
|
||||
GOARCH= CGO_ENABLED=0 go generate ./public/app/plugins
|
||||
GOARCH= CGO_ENABLED=0 go generate ./pkg/plugins/plugindef
|
||||
GOARCH= CGO_ENABLED=0 go generate ./kinds/gen.go
|
||||
GOARCH= CGO_ENABLED=0 go generate ./public/app/plugins/gen.go
|
||||
GOARCH= CGO_ENABLED=0 go generate ./pkg/kindsys/report.go
|
||||
|
||||
# Work around `main module (github.com/grafana/grafana) does not contain package github.com/grafana/grafana/pkg/util/xorm`.
|
||||
# Apparently these files confuse the dependency resolution for the go builder implemented here.
|
||||
rm pkg/util/xorm/go.{mod,sum}
|
||||
|
||||
# The testcase makes an API call against grafana.com:
|
||||
#
|
||||
|
@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "copilot-cli";
|
||||
version = "1.25.0";
|
||||
version = "1.26.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aws";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Lhg3ZOCv5FlMh2FI92s8OR1XugkX0occv0ku7MKhL+8=";
|
||||
sha256 = "sha256-pmP1PqkLq5rkod896oRsSY3UX6q7F4kVREw8R+mLf2Y=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-rxnVNAgLOVBshm6tKOfqspOy+rQP7M22+Q3HnWBVjr8=";
|
||||
vendorHash = "sha256-jvK4xI0Pvv0ed6uSmfXltUkVmG4RqId4zEI9JFDzoBQ=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
@ -1,35 +1,27 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "pw-volume";
|
||||
version = "0.4.0";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "smasher164";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-u7Ct9Kfwld/h3b6hUZdfHNuDGE4NA3MwrmgUj4g64lw=";
|
||||
sha256 = "sha256-r/6AAZKZgPYUGic/Dag7OT5RtH+RKgEkJVWxsO5VGZ0=";
|
||||
};
|
||||
|
||||
cargoPatches = [
|
||||
(fetchurl {
|
||||
# update Cargo.lock
|
||||
url = "https://github.com/smasher164/pw-volume/commit/be104eaaeb84def26b392cc44bb1e7b880bef0fc.patch";
|
||||
sha256 = "sha256-gssRcKpqxSAvW+2kJzIAR/soIQ3xg6LDZ7OeXds4ulY=";
|
||||
})
|
||||
];
|
||||
|
||||
cargoSha256 = "sha256-Vzd5ZbbzJh2QqiOrBOszsNqLwxM+mm2lbGd5JtKZzEM=";
|
||||
cargoSha256 = "sha256-srwbrMBUJz/Xi+Hk2GY9oo4rcTfKl/r146YWSSx6dew=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Basic interface to PipeWire volume controls";
|
||||
homepage = "https://github.com/smasher164/pw-volume";
|
||||
changelog = "https://github.com/smasher164/pw-volume/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ astro ];
|
||||
maintainers = with maintainers; [ astro figsoda ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -34,11 +34,13 @@ python3Packages.buildPythonApplication rec {
|
||||
|
||||
mkdir -p $out/lib/systemd/system
|
||||
cp sample/systemd/borgmatic.timer $out/lib/systemd/system/
|
||||
# there is another "sleep", so choose the one with the space after it
|
||||
# due to https://github.com/borgmatic-collective/borgmatic/commit/2e9f70d49647d47fb4ca05f428c592b0e4319544
|
||||
substitute sample/systemd/borgmatic.service \
|
||||
$out/lib/systemd/system/borgmatic.service \
|
||||
--replace /root/.local/bin/borgmatic $out/bin/borgmatic \
|
||||
--replace systemd-inhibit ${systemd}/bin/systemd-inhibit \
|
||||
--replace sleep ${coreutils}/bin/sleep
|
||||
--replace "sleep " "${coreutils}/bin/sleep "
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion { package = borgmatic; };
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 991ecd8..9e94574 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -11,7 +11,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "as-tree"
|
||||
-version = "0.11.1"
|
||||
+version = "0.12.0"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"atty",
|
@ -1,27 +1,22 @@
|
||||
{ lib, fetchFromGitHub, rustPlatform }:
|
||||
{ lib, rustPlatform, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "as-tree";
|
||||
version = "0.12.0";
|
||||
version = "unstable-2021-03-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jez";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0c0g32pkyhyvqpgvzlw9244c80npq6s8mxy3may7q4qyd7hi3dz5";
|
||||
rev = "0036c20f66795774eb9cda3ccbae6ca1e1c19444";
|
||||
sha256 = "sha256-80yB89sKIuv7V68p0jEsi2hRdz+5CzE+4R0joRzO7Dk=";
|
||||
};
|
||||
|
||||
cargoSha256 = "1m334shcja7kg134b7lnq1ksy67j5b5vblkzamrw06f6r1hkn1rc";
|
||||
# the upstream 0.12.0 release didn't update the Cargo.lock file properly
|
||||
# they have updated their release script, so this patch can be removed
|
||||
# when the next version is released.
|
||||
cargoPatches = [ ./cargo-lock.patch ];
|
||||
cargoSha256 = "sha256-BLEVPKO2YwcKuM/rUeMuyE38phOrbq0e8cjqh1qmJjM=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Print a list of paths as a tree of paths";
|
||||
homepage = "https://github.com/jez/as-tree";
|
||||
license = with licenses; [ blueOak100 ];
|
||||
maintainers = with maintainers; [ jshholland ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -6,21 +6,22 @@
|
||||
, libiconv
|
||||
, Security
|
||||
, SystemConfiguration
|
||||
, xvfb-run
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "atuin";
|
||||
version = "12.0.0";
|
||||
version = "13.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ellie";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-kt0Xu95E3MayUybSh1mU5frJoU7BF41Hnjqqrz/cVHE=";
|
||||
hash = "sha256-yNn67lceg1XA72LDRRjCgSsKfEN/P5VUAnKO//ru0nc=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-WAAelEFtHlFGDk0AI381OS5bxN58Z46kyMAuL+XX/Ac=";
|
||||
cargoHash = "sha256-oIK2upvAapYU6WkoWjiwcmq57TDbDBTc+2OjsMdv23E=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
@ -33,6 +34,16 @@ rustPlatform.buildRustPackage rec {
|
||||
--zsh <($out/bin/atuin gen-completions -s zsh)
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
xvfb-run
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
xvfb-run cargo test
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) atuin;
|
||||
};
|
||||
@ -41,6 +52,6 @@ rustPlatform.buildRustPackage rec {
|
||||
description = "Replacement for a shell history which records additional commands context with optional encrypted synchronization between machines";
|
||||
homepage = "https://github.com/ellie/atuin";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ onsails SuperSandro2000 sciencentistguy ];
|
||||
maintainers = with maintainers; [ SuperSandro2000 sciencentistguy _0x4A6F ];
|
||||
};
|
||||
}
|
||||
|
58
pkgs/tools/misc/kb/default.nix
Normal file
58
pkgs/tools/misc/kb/default.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, python3
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "kb";
|
||||
version = "0.1.7";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnebbia";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-K8EAqZbl2e0h03fFwaKIclZTZARDQp1tRo44znxwW0I=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# `attr` module is not available. And `attrs` defines another `attr` package
|
||||
# that shadows it.
|
||||
substituteInPlace setup.py \
|
||||
--replace \
|
||||
"install_requires=[\"colored\",\"toml\",\"attr\",\"attrs\",\"gitpython\"]," \
|
||||
"install_requires=[\"colored\",\"toml\",\"attrs\",\"gitpython\"],"
|
||||
|
||||
# pytest coverage reporting isn't necessary
|
||||
substituteInPlace setup.cfg \
|
||||
--replace \
|
||||
"addopts = --cov=kb --cov-report term-missing" ""
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
colored
|
||||
toml
|
||||
attrs
|
||||
gitpython
|
||||
];
|
||||
|
||||
nativeCheckInputs = with python3.pkgs; [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A minimalist command line knowledge base manager";
|
||||
longDescription = ''
|
||||
kb is a text-oriented minimalist command line knowledge base manager. kb
|
||||
can be considered a quick note collection and access tool oriented toward
|
||||
software developers, penetration testers, hackers, students or whoever has
|
||||
to collect and organize notes in a clean way. Although kb is mainly
|
||||
targeted on text-based note collection, it supports non-text files as well
|
||||
(e.g., images, pdf, videos and others).
|
||||
'';
|
||||
homepage = "https://github.com/gnebbia/kb";
|
||||
changelog = "https://github.com/gnebbia/kb/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ wesleyjrz ];
|
||||
};
|
||||
}
|
@ -9,14 +9,14 @@ with python3.pkgs;
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "yutto";
|
||||
version = "2.0.0b18";
|
||||
version = "2.0.0b20";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-BuubfySQfw4ljWTc1yyW4Zqle0VTimFLQ6enZA3joeQ=";
|
||||
hash = "sha256-9tYc8MlKZ1pzuGMipy827RoUJkU+C6UQz/Cex48UhLQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -1,30 +1,18 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, fetchCrate
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "book-summary";
|
||||
version = "0.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dvogt23";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1dawddkpyasy22biqz35c912xqmwcx6ihpqp6cnikbdzv8ni8adr";
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
hash = "sha256-dxM6bqgHp4IaG03NriHvoT3al2u5Sz/I5ajlgzpjG1c=";
|
||||
};
|
||||
|
||||
cargoPatches = [
|
||||
# add Cargo.lock
|
||||
# can be removed after https://github.com/dvogt23/book-summary/pull/23 gets merged
|
||||
(fetchpatch {
|
||||
url = "https://github.com/dvogt23/book-summary/commit/9d941a57db5cd2fd0e9813230d69eb1d166a48f8.patch";
|
||||
sha256 = "sha256-91dwJKdaLukxVZHA3RH1rxj45U/+mabFTflBaLd2rK8=";
|
||||
})
|
||||
];
|
||||
|
||||
cargoSha256 = "sha256-chuEzYUfZC/ZdWIUEmAXJAnXG2s8mCcNs6cuq8Lh5PQ=";
|
||||
cargoHash = "sha256-QwydecdQaxvh6vWZvO30zgvvgUT6T5dvGRSmcuTUJmc=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Book auto-summary for gitbook and mdBook";
|
||||
|
@ -1625,6 +1625,7 @@ mapAliases ({
|
||||
virtmanager = virt-manager; # Added 2019-10-29
|
||||
virtmanager-qt = virt-manager-qt; # Added 2019-10-29
|
||||
virtviewer = throw "'virtviewer' has been renamed to/replaced by 'virt-viewer'"; # Converted to throw 2022-02-22
|
||||
vivaldi-widevine = throw "'vivaldi-widevine' has been renamed to/replaced by 'widevine-cdm'"; # Added 2023-02-25
|
||||
vkBasalt = vkbasalt; # Added 2022-11-22
|
||||
vnc2flv = throw "vnc2flv has been removed: abandoned by upstream"; # Added 2022-03-21
|
||||
vorbisTools = throw "'vorbisTools' has been renamed to/replaced by 'vorbis-tools'"; # Converted to throw 2022-02-22
|
||||
|
@ -10229,6 +10229,8 @@ with pkgs;
|
||||
|
||||
nb = callPackage ../tools/misc/nb { };
|
||||
|
||||
kb = callPackage ../tools/misc/kb { };
|
||||
|
||||
notable = callPackage ../applications/misc/notable { };
|
||||
|
||||
nth = with python3Packages; toPythonApplication name-that-hash;
|
||||
@ -11414,7 +11416,9 @@ with pkgs;
|
||||
|
||||
qprint = callPackage ../tools/text/qprint { };
|
||||
|
||||
qscintilla = libsForQt5.callPackage ../development/libraries/qscintilla { };
|
||||
qscintilla = darwin.apple_sdk_11_0.callPackage ../development/libraries/qscintilla {
|
||||
inherit (libsForQt5) qmake qtbase qtmacextras;
|
||||
};
|
||||
|
||||
qscintilla-qt4 = callPackage ../development/libraries/qscintilla-qt4 { };
|
||||
|
||||
@ -32309,8 +32313,6 @@ with pkgs;
|
||||
|
||||
vivaldi-ffmpeg-codecs = callPackage ../applications/networking/browsers/vivaldi/ffmpeg-codecs.nix {};
|
||||
|
||||
vivaldi-widevine = callPackage ../applications/networking/browsers/vivaldi/widevine.nix { };
|
||||
|
||||
libopenmpt = callPackage ../development/libraries/audio/libopenmpt { };
|
||||
|
||||
libopenmpt-modplug = callPackage ../development/libraries/audio/libopenmpt-modplug { };
|
||||
|
Loading…
Reference in New Issue
Block a user