mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 17:23:34 +00:00
Merge master into staging-next
This commit is contained in:
commit
d33a11464d
@ -20,6 +20,7 @@ There is no uniform interface for build helpers.
|
|||||||
build-helpers/fetchers.chapter.md
|
build-helpers/fetchers.chapter.md
|
||||||
build-helpers/trivial-build-helpers.chapter.md
|
build-helpers/trivial-build-helpers.chapter.md
|
||||||
build-helpers/testers.chapter.md
|
build-helpers/testers.chapter.md
|
||||||
|
build-helpers/dev-shell-tools.chapter.md
|
||||||
build-helpers/special.md
|
build-helpers/special.md
|
||||||
build-helpers/images.md
|
build-helpers/images.md
|
||||||
hooks/index.md
|
hooks/index.md
|
||||||
|
29
doc/build-helpers/dev-shell-tools.chapter.md
Normal file
29
doc/build-helpers/dev-shell-tools.chapter.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Development Shell helpers {#chap-devShellTools}
|
||||||
|
|
||||||
|
The `nix-shell` command has popularized the concept of transient shell environments for development or testing purposes.
|
||||||
|
<!--
|
||||||
|
We should try to document the product, not its development process in the Nixpkgs reference manual,
|
||||||
|
but *something* needs to be said to provide context for this library.
|
||||||
|
This is the most future proof sentence I could come up with while Nix itself does yet make use of this.
|
||||||
|
Relevant is the current status of the devShell attribute "project": https://github.com/NixOS/nix/issues/7501
|
||||||
|
-->
|
||||||
|
However, `nix-shell` is not the only way to create such environments, and even `nix-shell` itself can indirectly benefit from this library.
|
||||||
|
|
||||||
|
This library provides a set of functions that help create such environments.
|
||||||
|
|
||||||
|
## `devShellTools.valueToString` {#sec-devShellTools-valueToString}
|
||||||
|
|
||||||
|
Converts Nix values to strings in the way the [`derivation` built-in function](https://nix.dev/manual/nix/2.23/language/derivations) does.
|
||||||
|
|
||||||
|
:::{.example}
|
||||||
|
## `valueToString` usage examples
|
||||||
|
|
||||||
|
```nix
|
||||||
|
devShellTools.valueToString (builtins.toFile "foo" "bar")
|
||||||
|
=> "/nix/store/...-foo"
|
||||||
|
```
|
||||||
|
|
||||||
|
```nix
|
||||||
|
devShellTools.valueToString false
|
||||||
|
=> ""
|
||||||
|
```
|
@ -4127,6 +4127,12 @@
|
|||||||
githubId = 34543609;
|
githubId = 34543609;
|
||||||
name = "creator54";
|
name = "creator54";
|
||||||
};
|
};
|
||||||
|
crertel = {
|
||||||
|
email = "chris@kedagital.com";
|
||||||
|
github = "crertel";
|
||||||
|
githubId = 1707779;
|
||||||
|
name = "Chris Ertel";
|
||||||
|
};
|
||||||
crinklywrappr = {
|
crinklywrappr = {
|
||||||
email = "crinklywrappr@pm.me";
|
email = "crinklywrappr@pm.me";
|
||||||
name = "Daniel Fitzpatrick";
|
name = "Daniel Fitzpatrick";
|
||||||
@ -16750,6 +16756,12 @@
|
|||||||
githubId = 52847440;
|
githubId = 52847440;
|
||||||
name = "Ryan Burns";
|
name = "Ryan Burns";
|
||||||
};
|
};
|
||||||
|
rcoeurjoly = {
|
||||||
|
email = "rolandcoeurjoly@gmail.com";
|
||||||
|
github = "RCoeurjoly";
|
||||||
|
githubId = 16906199;
|
||||||
|
name = "Roland Coeurjoly";
|
||||||
|
};
|
||||||
rconybea = {
|
rconybea = {
|
||||||
email = "n1xpkgs@hushmail.com";
|
email = "n1xpkgs@hushmail.com";
|
||||||
github = "rconybea";
|
github = "rconybea";
|
||||||
|
@ -769,6 +769,7 @@ with lib.maintainers;
|
|||||||
aanderse
|
aanderse
|
||||||
drupol
|
drupol
|
||||||
ma27
|
ma27
|
||||||
|
piotrkwiecinski
|
||||||
talyz
|
talyz
|
||||||
];
|
];
|
||||||
githubTeams = [ "php" ];
|
githubTeams = [ "php" ];
|
||||||
|
@ -98,11 +98,11 @@ in {
|
|||||||
services.kmscon.extraConfig =
|
services.kmscon.extraConfig =
|
||||||
let
|
let
|
||||||
xkb = optionals cfg.useXkbConfig
|
xkb = optionals cfg.useXkbConfig
|
||||||
lib.mapAttrsToList (n: v: "xkb-${n}=${v}") (
|
(lib.mapAttrsToList (n: v: "xkb-${n}=${v}") (
|
||||||
lib.filterAttrs
|
lib.filterAttrs
|
||||||
(n: v: builtins.elem n ["layout" "model" "options" "variant"] && v != "")
|
(n: v: builtins.elem n ["layout" "model" "options" "variant"] && v != "")
|
||||||
config.services.xserver.xkb
|
config.services.xserver.xkb
|
||||||
);
|
));
|
||||||
render = optionals cfg.hwRender [ "drm" "hwaccel" ];
|
render = optionals cfg.hwRender [ "drm" "hwaccel" ];
|
||||||
fonts = optional (cfg.fonts != null) "font-name=${lib.concatMapStringsSep ", " (f: f.name) cfg.fonts}";
|
fonts = optional (cfg.fonts != null) "font-name=${lib.concatMapStringsSep ", " (f: f.name) cfg.fonts}";
|
||||||
in lib.concatStringsSep "\n" (xkb ++ render ++ fonts);
|
in lib.concatStringsSep "\n" (xkb ++ render ++ fonts);
|
||||||
|
@ -34,6 +34,6 @@ rustPlatform.buildRustPackage rec {
|
|||||||
mainProgram = "muso";
|
mainProgram = "muso";
|
||||||
homepage = "https://github.com/quebin31/muso";
|
homepage = "https://github.com/quebin31/muso";
|
||||||
license = with licenses; [ gpl3Plus ];
|
license = with licenses; [ gpl3Plus ];
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ crertel ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
homepage = "https://github.com/Cloudef/bemenu";
|
homepage = "https://github.com/Cloudef/bemenu";
|
||||||
description = "Dynamic menu library and client program inspired by dmenu";
|
description = "Dynamic menu library and client program inspired by dmenu";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ crertel ];
|
||||||
mainProgram = "bemenu";
|
mainProgram = "bemenu";
|
||||||
platforms = with platforms; linux;
|
platforms = with platforms; linux;
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
|||||||
description = "program to monitor X11/Client conversations";
|
description = "program to monitor X11/Client conversations";
|
||||||
homepage = "https://cgit.freedesktop.org/xorg/app/xscope/";
|
homepage = "https://cgit.freedesktop.org/xorg/app/xscope/";
|
||||||
license = with licenses; [ mit ];
|
license = with licenses; [ mit ];
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ crertel ];
|
||||||
platforms = with platforms; unix;
|
platforms = with platforms; unix;
|
||||||
mainProgram = "xscope";
|
mainProgram = "xscope";
|
||||||
};
|
};
|
||||||
|
13
pkgs/build-support/dev-shell-tools/README.md
Normal file
13
pkgs/build-support/dev-shell-tools/README.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# `devShellTools`
|
||||||
|
|
||||||
|
This directory implements the `pkgs.devShellTools` library.
|
||||||
|
|
||||||
|
# Contributing to `devShellTools`
|
||||||
|
|
||||||
|
- Documentation should be contributed to the Nixpkgs manual, not here.
|
||||||
|
|
||||||
|
- Tests are available in the `tests` directory.
|
||||||
|
You may run them with `nix-build -A tests.devShellTools`.
|
||||||
|
|
||||||
|
- See [../../README.md](../../README.md) for more information on contributing to Nixpkgs.
|
16
pkgs/build-support/dev-shell-tools/default.nix
Normal file
16
pkgs/build-support/dev-shell-tools/default.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ lib }:
|
||||||
|
let
|
||||||
|
inherit (builtins) typeOf;
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
# This function closely mirrors what this Nix code does:
|
||||||
|
# https://github.com/NixOS/nix/blob/2.8.0/src/libexpr/primops.cc#L1102
|
||||||
|
# https://github.com/NixOS/nix/blob/2.8.0/src/libexpr/eval.cc#L1981-L2036
|
||||||
|
valueToString = value:
|
||||||
|
# We can't just use `toString` on all derivation attributes because that
|
||||||
|
# would not put path literals in the closure. So we explicitly copy
|
||||||
|
# those into the store here
|
||||||
|
if typeOf value == "path" then "${value}"
|
||||||
|
else if typeOf value == "list" then toString (map valueToString value)
|
||||||
|
else toString value;
|
||||||
|
}
|
45
pkgs/build-support/dev-shell-tools/tests/default.nix
Normal file
45
pkgs/build-support/dev-shell-tools/tests/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
devShellTools,
|
||||||
|
emptyFile,
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
hello,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib) escapeShellArg;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# nix-build -A tests.devShellTools.valueToString
|
||||||
|
valueToString =
|
||||||
|
let inherit (devShellTools) valueToString; in
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "devShellTools-valueToString-built-tests";
|
||||||
|
|
||||||
|
# Test inputs
|
||||||
|
inherit emptyFile hello;
|
||||||
|
one = 1;
|
||||||
|
boolTrue = true;
|
||||||
|
boolFalse = false;
|
||||||
|
foo = "foo";
|
||||||
|
list = [ 1 2 3 ];
|
||||||
|
pathDefaultNix = ./default.nix;
|
||||||
|
packages = [ hello emptyFile ];
|
||||||
|
# TODO: nested lists
|
||||||
|
|
||||||
|
buildCommand = ''
|
||||||
|
touch $out
|
||||||
|
( set -x
|
||||||
|
[[ "$one" = ${escapeShellArg (valueToString 1)} ]]
|
||||||
|
[[ "$boolTrue" = ${escapeShellArg (valueToString true)} ]]
|
||||||
|
[[ "$boolFalse" = ${escapeShellArg (valueToString false)} ]]
|
||||||
|
[[ "$foo" = ${escapeShellArg (valueToString "foo")} ]]
|
||||||
|
[[ "$hello" = ${escapeShellArg (valueToString hello)} ]]
|
||||||
|
[[ "$list" = ${escapeShellArg (valueToString [ 1 2 3 ])} ]]
|
||||||
|
[[ "$packages" = ${escapeShellArg (valueToString [ hello emptyFile ])} ]]
|
||||||
|
[[ "$pathDefaultNix" = ${escapeShellArg (valueToString ./default.nix)} ]]
|
||||||
|
[[ "$emptyFile" = ${escapeShellArg (valueToString emptyFile)} ]]
|
||||||
|
) >log 2>&1 || { cat log; exit 1; }
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
@ -4,6 +4,7 @@
|
|||||||
, callPackage
|
, callPackage
|
||||||
, closureInfo
|
, closureInfo
|
||||||
, coreutils
|
, coreutils
|
||||||
|
, devShellTools
|
||||||
, e2fsprogs
|
, e2fsprogs
|
||||||
, proot
|
, proot
|
||||||
, fakeNss
|
, fakeNss
|
||||||
@ -49,6 +50,10 @@ let
|
|||||||
toList
|
toList
|
||||||
;
|
;
|
||||||
|
|
||||||
|
inherit (devShellTools)
|
||||||
|
valueToString
|
||||||
|
;
|
||||||
|
|
||||||
mkDbExtraCommand = contents:
|
mkDbExtraCommand = contents:
|
||||||
let
|
let
|
||||||
contentsList = if builtins.isList contents then contents else [ contents ];
|
contentsList = if builtins.isList contents then contents else [ contents ];
|
||||||
@ -1141,7 +1146,7 @@ rec {
|
|||||||
|
|
||||||
# A binary that calls the command to build the derivation
|
# A binary that calls the command to build the derivation
|
||||||
builder = writeShellScriptBin "buildDerivation" ''
|
builder = writeShellScriptBin "buildDerivation" ''
|
||||||
exec ${lib.escapeShellArg (stringValue drv.drvAttrs.builder)} ${lib.escapeShellArgs (map stringValue drv.drvAttrs.args)}
|
exec ${lib.escapeShellArg (valueToString drv.drvAttrs.builder)} ${lib.escapeShellArgs (map valueToString drv.drvAttrs.args)}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
staticPath = "${dirOf shell}:${lib.makeBinPath [ builder ]}";
|
staticPath = "${dirOf shell}:${lib.makeBinPath [ builder ]}";
|
||||||
@ -1173,20 +1178,9 @@ rec {
|
|||||||
# https://github.com/NixOS/nix/blob/2.8.0/src/libstore/globals.hh#L464-L465
|
# https://github.com/NixOS/nix/blob/2.8.0/src/libstore/globals.hh#L464-L465
|
||||||
sandboxBuildDir = "/build";
|
sandboxBuildDir = "/build";
|
||||||
|
|
||||||
# This function closely mirrors what this Nix code does:
|
|
||||||
# https://github.com/NixOS/nix/blob/2.8.0/src/libexpr/primops.cc#L1102
|
|
||||||
# https://github.com/NixOS/nix/blob/2.8.0/src/libexpr/eval.cc#L1981-L2036
|
|
||||||
stringValue = value:
|
|
||||||
# We can't just use `toString` on all derivation attributes because that
|
|
||||||
# would not put path literals in the closure. So we explicitly copy
|
|
||||||
# those into the store here
|
|
||||||
if builtins.typeOf value == "path" then "${value}"
|
|
||||||
else if builtins.typeOf value == "list" then toString (map stringValue value)
|
|
||||||
else toString value;
|
|
||||||
|
|
||||||
# https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L992-L1004
|
# https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L992-L1004
|
||||||
drvEnv = lib.mapAttrs' (name: value:
|
drvEnv = lib.mapAttrs' (name: value:
|
||||||
let str = stringValue value;
|
let str = valueToString value;
|
||||||
in if lib.elem name (drv.drvAttrs.passAsFile or [])
|
in if lib.elem name (drv.drvAttrs.passAsFile or [])
|
||||||
then lib.nameValuePair "${name}Path" (writeText "pass-as-text-${name}" str)
|
then lib.nameValuePair "${name}Path" (writeText "pass-as-text-${name}" str)
|
||||||
else lib.nameValuePair name str
|
else lib.nameValuePair name str
|
||||||
|
@ -77,13 +77,13 @@ let
|
|||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "ansel";
|
pname = "ansel";
|
||||||
version = "0-unstable-2024-02-23";
|
version = "0-unstable-2024-06-29";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "aurelienpierreeng";
|
owner = "aurelienpierreeng";
|
||||||
repo = "ansel";
|
repo = "ansel";
|
||||||
rev = "61eb388760d130476415a51e19f94b199a1088fe";
|
rev = "3799e7893d6b5221706f64a00a6d139fb9717380";
|
||||||
hash = "sha256-68EX5rnOlBHXZnMlXjQk+ZXFIwR5ZFc1Wyg8EzCKaUg=";
|
hash = "sha256-TyoLVZpKQ68/yjiUsJaXW1z0qr8krIAxRuFG7RtsToI=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
|
darwin,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
@ -18,6 +19,11 @@ rustPlatform.buildRustPackage rec {
|
|||||||
|
|
||||||
cargoHash = "sha256-cHEse+pXwgPTL8GJyY4s1mhWXGTY8Fnn2rFpA5SNerY=";
|
cargoHash = "sha256-cHEse+pXwgPTL8GJyY4s1mhWXGTY8Fnn2rFpA5SNerY=";
|
||||||
|
|
||||||
|
buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||||
|
DiskArbitration
|
||||||
|
Foundation
|
||||||
|
]);
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -Dm644 glrnvim.desktop -t $out/share/applications
|
install -Dm644 glrnvim.desktop -t $out/share/applications
|
||||||
install -Dm644 glrnvim.svg $out/share/icons/hicolor/scalable/apps/glrnvim.svg
|
install -Dm644 glrnvim.svg $out/share/icons/hicolor/scalable/apps/glrnvim.svg
|
||||||
|
53
pkgs/by-name/ma/marwaita-icons/package.nix
Normal file
53
pkgs/by-name/ma/marwaita-icons/package.nix
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
{ lib
|
||||||
|
, stdenvNoCC
|
||||||
|
, fetchFromGitHub
|
||||||
|
, gtk3
|
||||||
|
, breeze-icons
|
||||||
|
, hicolor-icon-theme
|
||||||
|
, pantheon
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenvNoCC.mkDerivation rec {
|
||||||
|
pname = "marwaita-icons";
|
||||||
|
version = "5.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "darkomarko42";
|
||||||
|
repo = "marwaita-icons";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-6NFCXj80VAoFX+i4By5IpbtJC4qL+sAzlLHUJjTQ/sI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
gtk3
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
breeze-icons
|
||||||
|
hicolor-icon-theme
|
||||||
|
pantheon.elementary-icon-theme
|
||||||
|
];
|
||||||
|
|
||||||
|
dontDropIconThemeCache = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/share/icons
|
||||||
|
cp -a Marwaita* $out/share/icons
|
||||||
|
|
||||||
|
for theme in $out/share/icons/*; do
|
||||||
|
gtk-update-icon-cache "$theme"
|
||||||
|
done
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Icon pack for linux";
|
||||||
|
homepage = "https://github.com/darkomarko42/Marwaita-Icons";
|
||||||
|
license = lib.licenses.gpl3Only;
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
maintainers = [ lib.maintainers.romildo ];
|
||||||
|
};
|
||||||
|
}
|
53
pkgs/by-name/ra/rainbowcrack/package.nix
Normal file
53
pkgs/by-name/ra/rainbowcrack/package.nix
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchurl,
|
||||||
|
alglib,
|
||||||
|
unzip,
|
||||||
|
autoPatchelfHook,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "rainbowcrack";
|
||||||
|
version = "1.8";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://project-rainbowcrack.com/rainbowcrack-${version}-linux64.zip";
|
||||||
|
hash = "sha256-xMC9teHiDvBY/VHV63TsNQjdcuLqHGeXUyjHvRTO9HQ=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
unzip
|
||||||
|
autoPatchelfHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [ stdenv.cc.cc.lib ];
|
||||||
|
|
||||||
|
dontConfigure = true;
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
mkdir -p $out/{bin,share/rainbowcrack}
|
||||||
|
unzip $src -d $out || true
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -Dm644 $out/rainbowcrack-1.8-linux64/*.txt $out/share/rainbowcrack
|
||||||
|
install -Dm755 $out/rainbowcrack-1.8-linux64/rt* $out/rainbowcrack-1.8-linux64/rcrack $out/bin
|
||||||
|
chmod +x $out/bin/*
|
||||||
|
rm -rf $out/rainbowcrack-1.8-linux64
|
||||||
|
'';
|
||||||
|
|
||||||
|
runtimeDependencies = [ alglib ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Rainbow table generator used for password cracking";
|
||||||
|
homepage = "http://project-rainbowcrack.com";
|
||||||
|
maintainers = with lib.maintainers; [ tochiaha ];
|
||||||
|
license = lib.licenses.unfree;
|
||||||
|
mainProgram = "rcrack";
|
||||||
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||||
|
platforms = [ "x86_64-linux64" ];
|
||||||
|
};
|
||||||
|
}
|
@ -44,7 +44,7 @@ rustPlatform.buildRustPackage rec {
|
|||||||
description = "Blazing fast terminal file manager written in Rust, based on async I/O";
|
description = "Blazing fast terminal file manager written in Rust, based on async I/O";
|
||||||
homepage = "https://github.com/sxyazi/yazi";
|
homepage = "https://github.com/sxyazi/yazi";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ xyenon matthiasbeyer linsui ];
|
maintainers = with lib.maintainers; [ xyenon matthiasbeyer linsui eljamm ];
|
||||||
mainProgram = "yazi";
|
mainProgram = "yazi";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,89 +1,93 @@
|
|||||||
{ lib
|
{
|
||||||
, runCommand
|
lib,
|
||||||
, makeWrapper
|
formats,
|
||||||
, yazi-unwrapped
|
runCommand,
|
||||||
|
makeWrapper,
|
||||||
|
|
||||||
, withRuntimeDeps ? true
|
extraPackages ? [ ],
|
||||||
, withFile ? true
|
optionalDeps ? [
|
||||||
, file
|
jq
|
||||||
, withJq ? true
|
poppler_utils
|
||||||
, jq
|
unar
|
||||||
, withPoppler ? true
|
ffmpegthumbnailer
|
||||||
, poppler_utils
|
fd
|
||||||
, withUnar ? true
|
ripgrep
|
||||||
, unar
|
fzf
|
||||||
, withFfmpegthumbnailer ? true
|
zoxide
|
||||||
, ffmpegthumbnailer
|
],
|
||||||
, withFd ? true
|
|
||||||
, fd
|
# deps
|
||||||
, withRipgrep ? true
|
file,
|
||||||
, ripgrep
|
yazi-unwrapped,
|
||||||
, withFzf ? true
|
|
||||||
, fzf
|
# optional deps
|
||||||
, withZoxide ? true
|
jq,
|
||||||
, zoxide
|
poppler_utils,
|
||||||
, settings ? { }
|
unar,
|
||||||
, formats
|
ffmpegthumbnailer,
|
||||||
, plugins ? { }
|
fd,
|
||||||
, flavors ? { }
|
ripgrep,
|
||||||
, initLua ? null
|
fzf,
|
||||||
|
zoxide,
|
||||||
|
|
||||||
|
settings ? { },
|
||||||
|
plugins ? { },
|
||||||
|
flavors ? { },
|
||||||
|
initLua ? null,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
runtimePaths = with lib;
|
runtimePaths = [ file ] ++ optionalDeps ++ extraPackages;
|
||||||
[ ]
|
|
||||||
++ optional withFile file
|
|
||||||
++ optional withJq jq
|
|
||||||
++ optional withPoppler poppler_utils
|
|
||||||
++ optional withUnar unar
|
|
||||||
++ optional withFfmpegthumbnailer ffmpegthumbnailer
|
|
||||||
++ optional withFd fd
|
|
||||||
++ optional withRipgrep ripgrep
|
|
||||||
++ optional withFzf fzf
|
|
||||||
++ optional withZoxide zoxide;
|
|
||||||
|
|
||||||
settingsFormat = formats.toml { };
|
settingsFormat = formats.toml { };
|
||||||
|
|
||||||
files = [ "yazi" "theme" "keymap" ];
|
files = [
|
||||||
|
"yazi"
|
||||||
|
"theme"
|
||||||
|
"keymap"
|
||||||
|
];
|
||||||
|
|
||||||
configHome = if (settings == { } && initLua == null && plugins == { } && flavors == { }) then null else
|
configHome =
|
||||||
runCommand "YAZI_CONFIG_HOME" { } ''
|
if (settings == { } && initLua == null && plugins == { } && flavors == { }) then
|
||||||
mkdir -p $out
|
null
|
||||||
${lib.concatMapStringsSep
|
else
|
||||||
"\n"
|
runCommand "YAZI_CONFIG_HOME" { } ''
|
||||||
(name: lib.optionalString (settings ? ${name} && settings.${name} != { }) ''
|
mkdir -p $out
|
||||||
ln -s ${settingsFormat.generate "${name}.toml" settings.${name}} $out/${name}.toml
|
${lib.concatMapStringsSep "\n" (
|
||||||
'')
|
name:
|
||||||
files}
|
lib.optionalString (settings ? ${name} && settings.${name} != { }) ''
|
||||||
|
ln -s ${settingsFormat.generate "${name}.toml" settings.${name}} $out/${name}.toml
|
||||||
|
''
|
||||||
|
) files}
|
||||||
|
|
||||||
mkdir $out/plugins
|
mkdir $out/plugins
|
||||||
${lib.optionalString (plugins != { }) ''
|
${lib.optionalString (plugins != { }) ''
|
||||||
${lib.concatStringsSep
|
${lib.concatStringsSep "\n" (
|
||||||
"\n"
|
lib.mapAttrsToList (name: value: "ln -s ${value} $out/plugins/${name}") plugins
|
||||||
(lib.mapAttrsToList (name: value: "ln -s ${value} $out/plugins/${name}") plugins)}
|
)}
|
||||||
''}
|
''}
|
||||||
|
|
||||||
mkdir $out/flavors
|
mkdir $out/flavors
|
||||||
${lib.optionalString (flavors != { }) ''
|
${lib.optionalString (flavors != { }) ''
|
||||||
${lib.concatStringsSep
|
${lib.concatStringsSep "\n" (
|
||||||
"\n"
|
lib.mapAttrsToList (name: value: "ln -s ${value} $out/flavors/${name}") flavors
|
||||||
(lib.mapAttrsToList (name: value: "ln -s ${value} $out/flavors/${name}") flavors)}
|
)}
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
|
||||||
${lib.optionalString (initLua != null) "ln -s ${initLua} $out/init.lua"}
|
${lib.optionalString (initLua != null) "ln -s ${initLua} $out/init.lua"}
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
if (!withRuntimeDeps && configHome == null) then yazi-unwrapped else
|
|
||||||
runCommand yazi-unwrapped.name
|
runCommand yazi-unwrapped.name
|
||||||
{
|
{
|
||||||
inherit (yazi-unwrapped) pname version meta;
|
inherit (yazi-unwrapped) pname version meta;
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
} ''
|
}
|
||||||
mkdir -p $out/bin
|
''
|
||||||
ln -s ${yazi-unwrapped}/share $out/share
|
mkdir -p $out/bin
|
||||||
makeWrapper ${yazi-unwrapped}/bin/yazi $out/bin/yazi \
|
ln -s ${yazi-unwrapped}/share $out/share
|
||||||
${lib.optionalString withRuntimeDeps "--prefix PATH : \"${lib.makeBinPath runtimePaths}\""} \
|
makeWrapper ${yazi-unwrapped}/bin/yazi $out/bin/yazi \
|
||||||
${lib.optionalString (configHome != null) "--set YAZI_CONFIG_HOME ${configHome}"}
|
--prefix PATH : ${lib.makeBinPath runtimePaths} \
|
||||||
''
|
${lib.optionalString (configHome != null) "--set YAZI_CONFIG_HOME ${configHome}"}
|
||||||
|
''
|
||||||
|
@ -47,11 +47,11 @@ let
|
|||||||
in
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "go";
|
pname = "go";
|
||||||
version = "1.21.11";
|
version = "1.21.12";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz";
|
url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz";
|
||||||
hash = "sha256-Qq7pvytpVsdaetaqPwpRtYIf/qxX9aLnM6LW6uHm2dI=";
|
hash = "sha256-MOaK8nvB8d8jHjq3Tz0X07jVKgicebyqtXO08bgH7U8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
|||||||
description = "Set of Thai language support routines";
|
description = "Set of Thai language support routines";
|
||||||
license = licenses.lgpl21Plus;
|
license = licenses.lgpl21Plus;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ crertel ];
|
||||||
pkgConfigModules = [ "libthai" ];
|
pkgConfigModules = [ "libthai" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "bundlewrap";
|
pname = "bundlewrap";
|
||||||
version = "4.18.0";
|
version = "4.19.0";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.8";
|
||||||
@ -28,7 +28,7 @@ buildPythonPackage rec {
|
|||||||
owner = "bundlewrap";
|
owner = "bundlewrap";
|
||||||
repo = "bundlewrap";
|
repo = "bundlewrap";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-7jBFeJem+0vZot+BknKmCxozmoHCBCAZqDbfQQG3/Vw=";
|
hash = "sha256-sNdtJRpP54xlkYis4whoGiJJ/Tjnrs4TW6EO3eAMBAo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ setuptools ];
|
nativeBuildInputs = [ setuptools ];
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
pythonOlder,
|
pythonOlder,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
poetry-core,
|
hatchling,
|
||||||
aiohttp,
|
aiohttp,
|
||||||
async-timeout,
|
async-timeout,
|
||||||
yarl,
|
yarl,
|
||||||
@ -14,26 +14,26 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "here-routing";
|
pname = "here-routing";
|
||||||
version = "1.0.0";
|
version = "1.0.1";
|
||||||
|
|
||||||
disabled = pythonOlder "3.10";
|
disabled = pythonOlder "3.10";
|
||||||
|
|
||||||
format = "pyproject";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "eifinger";
|
owner = "eifinger";
|
||||||
repo = "here_routing";
|
repo = "here_routing";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-wdjPbM9J+2q3NisdlOHIddSWHHIfwQY/83v6IBAXSq0=";
|
hash = "sha256-sdNs5QNYvL1Cpbk9Yi+7PSiDZ6LEgAXQ19IYSAY78p0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i "/^addopts/d" pyproject.toml
|
sed -i "/^addopts/d" pyproject.toml
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ poetry-core ];
|
build-system = [ hatchling ];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
dependencies = [
|
||||||
aiohttp
|
aiohttp
|
||||||
async-timeout
|
async-timeout
|
||||||
yarl
|
yarl
|
||||||
@ -48,7 +48,7 @@ buildPythonPackage rec {
|
|||||||
pythonImportsCheck = [ "here_routing" ];
|
pythonImportsCheck = [ "here_routing" ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
changelog = "https://github.com/eifinger/here_routing/blob/${src.rev}/CHANGELOG.md";
|
changelog = "https://github.com/eifinger/here_routing/releases/tag/v${version}";
|
||||||
description = "Asynchronous Python client for the HERE Routing V8 API";
|
description = "Asynchronous Python client for the HERE Routing V8 API";
|
||||||
homepage = "https://github.com/eifinger/here_routing";
|
homepage = "https://github.com/eifinger/here_routing";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
pythonOlder,
|
pythonOlder,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
poetry-core,
|
hatchling,
|
||||||
aiohttp,
|
aiohttp,
|
||||||
async-timeout,
|
async-timeout,
|
||||||
yarl,
|
yarl,
|
||||||
@ -14,26 +14,26 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "here-transit";
|
pname = "here-transit";
|
||||||
version = "1.2.0";
|
version = "1.2.1";
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.10";
|
||||||
|
|
||||||
format = "pyproject";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "eifinger";
|
owner = "eifinger";
|
||||||
repo = "here_transit";
|
repo = "here_transit";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-C5HZZCmK9ILUUXyx1i/cUggSM3xbOzXiJ13hrT2DWAI=";
|
hash = "sha256-fORg1iqRcD75Is1EW9XeAu8astibypmnNXo3vHduQdk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i "/^addopts/d" pyproject.toml
|
sed -i "/^addopts/d" pyproject.toml
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ poetry-core ];
|
build-system = [ hatchling ];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
dependencies = [
|
||||||
aiohttp
|
aiohttp
|
||||||
async-timeout
|
async-timeout
|
||||||
yarl
|
yarl
|
||||||
@ -48,7 +48,7 @@ buildPythonPackage rec {
|
|||||||
pythonImportsCheck = [ "here_transit" ];
|
pythonImportsCheck = [ "here_transit" ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
changelog = "https://github.com/eifinger/here_transit/blob/${src.rev}/CHANGELOG.md";
|
changelog = "https://github.com/eifinger/here_transit/releases/tag/v${version}";
|
||||||
description = "Asynchronous Python client for the HERE Routing V8 API";
|
description = "Asynchronous Python client for the HERE Routing V8 API";
|
||||||
homepage = "https://github.com/eifinger/here_transit";
|
homepage = "https://github.com/eifinger/here_transit";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "transformers";
|
pname = "transformers";
|
||||||
version = "4.41.2";
|
version = "4.42.3";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.8";
|
||||||
@ -64,7 +64,7 @@ buildPythonPackage rec {
|
|||||||
owner = "huggingface";
|
owner = "huggingface";
|
||||||
repo = "transformers";
|
repo = "transformers";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-Y3WYO+63n/ATT9RmRJ9JLuhFWUiuBO4NL2KzvzELi+M=";
|
hash = "sha256-vcwOFprscE8R3AdIJudYme9vvSFJvF+iCzRzBhiggr8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
build-system = [ setuptools ];
|
build-system = [ setuptools ];
|
||||||
|
@ -17,20 +17,20 @@ let
|
|||||||
in
|
in
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "tauri";
|
pname = "tauri";
|
||||||
version = "1.6.8";
|
version = "1.7.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tauri-apps";
|
owner = "tauri-apps";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "tauri-v${version}";
|
rev = "tauri-v${version}";
|
||||||
hash = "sha256-6GUgxSfuy2v38lYVdjsN0vd63/Aci0ERgG2kF2E2AFA=";
|
hash = "sha256-xQsj+NjfWc4nU/MKPzWal6n+YZpruypPoUm926JiI7k=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at
|
# Manually specify the sourceRoot since this crate depends on other crates in the workspace. Relevant info at
|
||||||
# https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202
|
# https://discourse.nixos.org/t/difficulty-using-buildrustpackage-with-a-src-containing-multiple-cargo-workspaces/10202
|
||||||
sourceRoot = "${src.name}/tooling/cli";
|
sourceRoot = "${src.name}/tooling/cli";
|
||||||
|
|
||||||
cargoHash = "sha256-HC+6AoBx51ahK6QA1Ug7jaKftkE5W3FS629uQ0yrV3Q=";
|
cargoHash = "sha256-xcytn3cV1Tw6O9glihbyCvERuUBA1yioR4PIbL1T53Q=";
|
||||||
|
|
||||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isLinux [ glibc libsoup cairo gtk3 webkitgtk ]
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isLinux [ glibc libsoup cairo gtk3 webkitgtk ]
|
||||||
++ lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ];
|
++ lib.optionals stdenv.isDarwin [ CoreServices Security SystemConfiguration ];
|
||||||
|
@ -83,6 +83,8 @@ with pkgs;
|
|||||||
inherit gccTests;
|
inherit gccTests;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
devShellTools = callPackage ../build-support/dev-shell-tools/tests { };
|
||||||
|
|
||||||
stdenv-inputs = callPackage ./stdenv-inputs { };
|
stdenv-inputs = callPackage ./stdenv-inputs { };
|
||||||
stdenv = callPackage ./stdenv { };
|
stdenv = callPackage ./stdenv { };
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
|||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "GL Easy Extension Library";
|
description = "GL Easy Extension Library";
|
||||||
homepage = "https://sourceforge.net/p/glee/glee/";
|
homepage = "https://sourceforge.net/p/glee/glee/";
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ crertel ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
};
|
};
|
||||||
|
@ -837,6 +837,8 @@ with pkgs;
|
|||||||
|
|
||||||
grsync = callPackage ../applications/misc/grsync { };
|
grsync = callPackage ../applications/misc/grsync { };
|
||||||
|
|
||||||
|
devShellTools = callPackage ../build-support/dev-shell-tools { };
|
||||||
|
|
||||||
dockerTools = callPackage ../build-support/docker {
|
dockerTools = callPackage ../build-support/docker {
|
||||||
writePython3 = buildPackages.writers.writePython3;
|
writePython3 = buildPackages.writers.writePython3;
|
||||||
};
|
};
|
||||||
@ -28604,6 +28606,10 @@ with pkgs;
|
|||||||
|
|
||||||
marwaita = callPackage ../data/themes/marwaita { };
|
marwaita = callPackage ../data/themes/marwaita { };
|
||||||
|
|
||||||
|
marwaita-icons = callPackage ../by-name/ma/marwaita-icons/package.nix {
|
||||||
|
inherit (kdePackages) breeze-icons;
|
||||||
|
};
|
||||||
|
|
||||||
marwaita-manjaro = callPackage ../data/themes/marwaita-manjaro { };
|
marwaita-manjaro = callPackage ../data/themes/marwaita-manjaro { };
|
||||||
|
|
||||||
marwaita-peppermint = callPackage ../data/themes/marwaita-peppermint { };
|
marwaita-peppermint = callPackage ../data/themes/marwaita-peppermint { };
|
||||||
|
Loading…
Reference in New Issue
Block a user