Merge remote-tracking branch 'origin/master' into haskell-updates

This commit is contained in:
sternenseemann 2023-07-01 11:57:11 +02:00
commit 9288b5cf9d
45 changed files with 1261 additions and 376 deletions

View File

@ -18,6 +18,7 @@ rec {
elemAt
filter
fromJSON
genList
head
isInt
isList
@ -346,7 +347,7 @@ rec {
=> [ "<EFBFBD>" "<EFBFBD>" "<EFBFBD>" "<EFBFBD>" ]
*/
stringToCharacters = s:
map (p: substring p 1 s) (lib.range 0 (stringLength s - 1));
genList (p: substring p 1 s) (stringLength s);
/* Manipulate a string character by character and replace them by
strings before concatenating the results.

View File

@ -6,8 +6,6 @@
with lib;
{
boot.vesa = false;
# Don't start a tty on the serial consoles.
systemd.services."serial-getty@ttyS0".enable = lib.mkDefault false;
systemd.services."serial-getty@hvc0".enable = false;
@ -15,7 +13,7 @@ with lib;
systemd.services."autovt@".enable = false;
# Since we can't manually respond to a panic, just reboot.
boot.kernelParams = [ "panic=1" "boot.panic_on_fail" ];
boot.kernelParams = [ "panic=1" "boot.panic_on_fail" "vga=0x317" "nomodeset" ];
# Don't allow emergency mode, because we don't have a console.
systemd.enableEmergencyMode = false;

View File

@ -207,7 +207,9 @@ in
# conflicts display-manager.service, then when nixos-rebuild
# switch starts multi-user.target, display-manager.service is
# stopped so plymouth-quit.service can be started.)
systemd.services.plymouth-quit.wantedBy = lib.mkForce [];
systemd.services.plymouth-quit = mkIf config.boot.plymouth.enable {
wantedBy = lib.mkForce [];
};
systemd.services.display-manager.serviceConfig = {
# Restart = "always"; - already defined in xserver.nix

View File

@ -10,27 +10,30 @@
, productShort ? product
, src
, version
, plugins ? [ ]
, buildNumber
, ...
}:
let
loname = lib.toLower productShort;
in
stdenvNoCC.mkDerivation {
inherit pname meta src version;
desktopName = product;
installPhase = ''
runHook preInstall
APP_DIR="$out/Applications/${product}.app"
mkdir -p "$APP_DIR"
cp -Tr "${product}.app" "$APP_DIR"
mkdir -p "$out/bin"
cat << EOF > "$out/bin/${loname}"
open -na '$APP_DIR' --args "\$@"
EOF
chmod +x "$out/bin/${loname}"
runHook postInstall
'';
nativeBuildInputs = [ undmg ];
sourceRoot = ".";
}
stdenvNoCC.mkDerivation {
inherit pname meta src version plugins;
passthru.buildNumber = buildNumber;
desktopName = product;
installPhase = ''
runHook preInstall
APP_DIR="$out/Applications/${product}.app"
mkdir -p "$APP_DIR"
cp -Tr "${product}.app" "$APP_DIR"
mkdir -p "$out/bin"
cat << EOF > "$out/bin/${loname}"
open -na '$APP_DIR' --args "\$@"
EOF
chmod +x "$out/bin/${loname}"
runHook postInstall
'';
nativeBuildInputs = [ undmg ];
sourceRoot = ".";
}

View File

@ -1,5 +1,13 @@
{ lib, stdenv, callPackage, fetchurl
, jdk, cmake, gdb, zlib, python3, icu
{ lib
, stdenv
, callPackage
, fetchurl
, jdk
, cmake
, gdb
, zlib
, python3
, icu
, lldb
, dotnet-sdk_6
, maven
@ -27,9 +35,9 @@ let
# Sorted alphabetically
buildClion = { pname, version, src, license, description, wmClass, ... }:
buildClion = { pname, version, src, license, description, wmClass, buildNumber, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk;
inherit pname version src wmClass jdk buildNumber;
product = "CLion";
meta = with lib; {
homepage = "https://www.jetbrains.com/clion/";
@ -41,11 +49,10 @@ let
maintainers = with maintainers; [ edwtjo mic92 ];
};
}).overrideAttrs (attrs: {
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ lib.optionals (stdenv.isLinux) [
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
autoPatchelfHook
patchelf
];
buildInputs = (attrs.buildInputs or []) ++ lib.optionals (stdenv.isLinux) [
buildInputs = (attrs.buildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
python3
stdenv.cc.cc
libdbusmenu
@ -57,12 +64,12 @@ let
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
(
cd $out/clion
# bundled cmake does not find libc
rm -rf bin/cmake/linux
ln -s ${cmake} bin/cmake/linux
# bundled gdb does not find libcrypto 10
rm -rf bin/gdb/linux
ln -s ${gdb} bin/gdb/linux
# I think the included gdb has a couple of patches, so we patch it instead of replacing
ls -d $PWD/bin/gdb/linux/x64/lib/python3.8/lib-dynload/* |
xargs patchelf \
--replace-needed libssl.so.10 libssl.so \
--replace-needed libcrypto.so.10 libcrypto.so
ls -d $PWD/bin/lldb/linux/x64/lib/python3.8/lib-dynload/* |
xargs patchelf \
@ -70,16 +77,15 @@ let
--replace-needed libcrypto.so.10 libcrypto.so
autoPatchelf $PWD/bin
wrapProgram $out/bin/clion \
--set CL_JDK "${jdk}"
)
'';
});
buildDataGrip = { pname, version, src, license, description, wmClass, ... }:
buildDataGrip = { pname, version, src, license, description, wmClass, buildNumber, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk;
inherit pname version src wmClass jdk buildNumber;
product = "DataGrip";
meta = with lib; {
homepage = "https://www.jetbrains.com/datagrip/";
@ -93,9 +99,9 @@ let
};
});
buildDataSpell = { pname, version, src, license, description, wmClass, ... }:
buildDataSpell = { pname, version, src, license, description, wmClass, buildNumber, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk;
inherit pname version src wmClass jdk buildNumber;
product = "DataSpell";
meta = with lib; {
homepage = "https://www.jetbrains.com/dataspell/";
@ -108,9 +114,9 @@ let
};
});
buildGateway = { pname, version, src, license, description, wmClass, product, ... }:
buildGateway = { pname, version, src, license, description, wmClass, buildNumber, product, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk product;
inherit pname version src wmClass jdk buildNumber product;
productShort = "Gateway";
meta = with lib; {
homepage = "https://www.jetbrains.com/remote-development/gateway/";
@ -124,9 +130,9 @@ let
};
});
buildGoland = { pname, version, src, license, description, wmClass, ... }:
buildGoland = { pname, version, src, license, description, wmClass, buildNumber, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk;
inherit pname version src wmClass jdk buildNumber;
product = "Goland";
meta = with lib; {
homepage = "https://www.jetbrains.com/go/";
@ -143,18 +149,16 @@ let
postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux ''
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
patchelf --set-interpreter $interp $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
chmod +x $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
# fortify source breaks build since delve compiles with -O0
wrapProgram $out/bin/goland \
--prefix CGO_CPPFLAGS " " "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
'';
});
buildIdea = { pname, version, src, license, description, wmClass, product, ... }:
buildIdea = { pname, version, src, license, description, wmClass, buildNumber, product, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk product;
inherit pname version src wmClass jdk buildNumber product;
productShort = "IDEA";
extraLdPath = [ zlib ];
extraWrapperArgs = [
@ -175,9 +179,9 @@ let
};
});
buildMps = { pname, version, src, license, description, wmClass, product, ... }:
buildMps = { pname, version, src, license, description, wmClass, product, buildNumber, ... }:
(mkJetBrainsProduct rec {
inherit pname version src wmClass jdk product;
inherit pname version src wmClass jdk buildNumber product;
productShort = "MPS";
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64);
@ -193,9 +197,9 @@ let
};
});
buildPhpStorm = { pname, version, src, license, description, wmClass, ... }:
buildPhpStorm = { pname, version, src, license, description, wmClass, buildNumber, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk;
inherit pname version src wmClass jdk buildNumber;
product = "PhpStorm";
meta = with lib; {
homepage = "https://www.jetbrains.com/phpstorm/";
@ -209,9 +213,9 @@ let
};
});
buildPycharm = { pname, version, src, license, description, wmClass, product, cythonSpeedup ? stdenv.isLinux, ... }:
buildPycharm = { pname, version, src, license, description, wmClass, buildNumber, product, cythonSpeedup ? stdenv.isLinux, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk product;
inherit pname version src wmClass jdk buildNumber product;
productShort = "PyCharm";
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64);
@ -230,24 +234,24 @@ let
providing you almost everything you need for your comfortable
and productive development!
'';
maintainers = with maintainers; [ ];
maintainers = with maintainers; [ genericnerdyusername ];
};
}).overrideAttrs (finalAttrs: previousAttrs: lib.optionalAttrs cythonSpeedup {
buildInputs = with python3.pkgs; [ python3 setuptools ];
preInstall = ''
echo "compiling cython debug speedups"
if [[ -d plugins/python-ce ]]; then
${python3.interpreter} plugins/python-ce/helpers/pydev/setup_cython.py build_ext --inplace
else
${python3.interpreter} plugins/python/helpers/pydev/setup_cython.py build_ext --inplace
fi
echo "compiling cython debug speedups"
if [[ -d plugins/python-ce ]]; then
${python3.interpreter} plugins/python-ce/helpers/pydev/setup_cython.py build_ext --inplace
else
${python3.interpreter} plugins/python/helpers/pydev/setup_cython.py build_ext --inplace
fi
'';
# See https://www.jetbrains.com/help/pycharm/2022.1/cython-speedups.html
});
buildRider = { pname, version, src, license, description, wmClass, ... }:
buildRider = { pname, version, src, license, description, wmClass, buildNumber, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk;
inherit pname version src wmClass jdk buildNumber;
product = "Rider";
# icu is required by Rider.Backend
extraLdPath = [ icu ];
@ -276,9 +280,9 @@ let
'');
});
buildRubyMine = { pname, version, src, license, description, wmClass, ... }:
buildRubyMine = { pname, version, src, license, description, wmClass, buildNumber, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk;
inherit pname version src wmClass jdk buildNumber;
product = "RubyMine";
meta = with lib; {
homepage = "https://www.jetbrains.com/ruby/";
@ -288,9 +292,9 @@ let
};
});
buildWebStorm = { pname, version, src, license, description, wmClass, ... }:
buildWebStorm = { pname, version, src, license, description, wmClass, buildNumber, ... }:
(mkJetBrainsProduct {
inherit pname version src wmClass jdk;
inherit pname version src wmClass jdk buildNumber;
product = "WebStorm";
meta = with lib; {
homepage = "https://www.jetbrains.com/webstorm/";
@ -312,7 +316,8 @@ in
clion = buildClion rec {
pname = "clion";
version = products.clion.version;
description = "C/C++ IDE. New. Intelligent. Cross-platform";
buildNumber = products.clion.build_number;
description = "C/C++ IDE. New. Intelligent. Cross-platform";
license = lib.licenses.unfree;
src = fetchurl {
url = products.clion.url;
@ -325,6 +330,7 @@ in
datagrip = buildDataGrip rec {
pname = "datagrip";
version = products.datagrip.version;
buildNumber = products.datagrip.build_number;
description = "Your Swiss Army Knife for Databases and SQL";
license = lib.licenses.unfree;
src = fetchurl {
@ -338,6 +344,7 @@ in
dataspell = buildDataSpell rec {
pname = "dataspell";
version = products.dataspell.version;
buildNumber = products.dataspell.build_number;
description = "The IDE for Professional Data Scientists";
license = lib.licenses.unfree;
src = fetchurl {
@ -352,6 +359,7 @@ in
pname = "gateway";
product = "JetBrains Gateway";
version = products.gateway.version;
buildNumber = products.gateway.build_number;
description = "Your single entry point to all remote development environments";
license = lib.licenses.unfree;
src = fetchurl {
@ -365,6 +373,7 @@ in
goland = buildGoland rec {
pname = "goland";
version = products.goland.version;
buildNumber = products.goland.build_number;
description = "Up and Coming Go IDE";
license = lib.licenses.unfree;
src = fetchurl {
@ -379,6 +388,7 @@ in
pname = "idea-community";
product = "IntelliJ IDEA CE";
version = products.idea-community.version;
buildNumber = products.idea-community.build_number;
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
license = lib.licenses.asl20;
src = fetchurl {
@ -393,6 +403,7 @@ in
pname = "idea-ultimate";
product = "IntelliJ IDEA";
version = products.idea-ultimate.version;
buildNumber = products.idea-ultimate.build_number;
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
license = lib.licenses.unfree;
src = fetchurl {
@ -407,6 +418,7 @@ in
pname = "mps";
product = "MPS ${products.mps.version}";
version = products.mps.version;
buildNumber = products.mps.build_number;
description = "Create your own domain-specific language";
license = lib.licenses.asl20;
src = fetchurl {
@ -420,6 +432,7 @@ in
phpstorm = buildPhpStorm rec {
pname = "phpstorm";
version = products.phpstorm.version;
buildNumber = products.phpstorm.build_number;
description = "Professional IDE for Web and PHP developers";
license = lib.licenses.unfree;
src = fetchurl {
@ -434,6 +447,7 @@ in
pname = "pycharm-community";
product = "PyCharm CE";
version = products.pycharm-community.version;
buildNumber = products.pycharm-community.build_number;
description = "PyCharm Community Edition";
license = lib.licenses.asl20;
src = fetchurl {
@ -448,6 +462,7 @@ in
pname = "pycharm-professional";
product = "PyCharm";
version = products.pycharm-professional.version;
buildNumber = products.pycharm-community.build_number;
description = "PyCharm Professional Edition";
license = lib.licenses.unfree;
src = fetchurl {
@ -461,6 +476,7 @@ in
rider = buildRider rec {
pname = "rider";
version = products.rider.version;
buildNumber = products.rider.build_number;
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
license = lib.licenses.unfree;
src = fetchurl {
@ -474,6 +490,7 @@ in
ruby-mine = buildRubyMine rec {
pname = "ruby-mine";
version = products.ruby-mine.version;
buildNumber = products.ruby-mine.build_number;
description = "The Most Intelligent Ruby and Rails IDE";
license = lib.licenses.unfree;
src = fetchurl {
@ -487,6 +504,7 @@ in
webstorm = buildWebStorm rec {
pname = "webstorm";
version = products.webstorm.version;
buildNumber = products.webstorm.build_number;
description = "Professional IDE for Web and JavaScript development";
license = lib.licenses.unfree;
src = fetchurl {
@ -497,4 +515,6 @@ in
update-channel = products.webstorm.update-channel;
};
plugins = callPackage ./plugins { };
}

View File

@ -1,25 +1,51 @@
{ stdenv, lib, makeDesktopItem, makeWrapper, patchelf, writeText
, coreutils, gnugrep, which, git, unzip, libsecret, libnotify, e2fsprogs
, python3, vmopts ? null
{ stdenv
, lib
, makeDesktopItem
, makeWrapper
, patchelf
, writeText
, coreutils
, gnugrep
, which
, git
, unzip
, libsecret
, libnotify
, e2fsprogs
, python3
, vmopts ? null
}:
{ pname, product, productShort ? product, version, src, wmClass, jdk, meta, extraLdPath ? [], extraWrapperArgs ? [] }@args:
{ pname
, product
, productShort ? product
, version
, src
, wmClass
, buildNumber
, jdk
, meta
, extraLdPath ? [ ]
, extraWrapperArgs ? [ ]
}@args:
let loName = lib.toLower productShort;
hiName = lib.toUpper productShort;
vmoptsName = loName
+ lib.optionalString stdenv.hostPlatform.is64bit "64"
+ ".vmoptions";
let
loName = lib.toLower productShort;
hiName = lib.toUpper productShort;
vmoptsName = loName
+ lib.optionalString stdenv.hostPlatform.is64bit "64"
+ ".vmoptions";
in
with stdenv; lib.makeOverridable mkDerivation (rec {
inherit pname version src;
passthru.buildNumber = buildNumber;
meta = args.meta // { mainProgram = pname; };
desktopItem = makeDesktopItem {
name = pname;
exec = pname;
comment = lib.replaceStrings ["\n"] [" "] meta.longDescription;
comment = lib.replaceStrings [ "\n" ] [ " " ] meta.longDescription;
desktopName = product;
genericName = meta.description;
categories = [ "Development" ];
@ -32,30 +58,30 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
nativeBuildInputs = [ makeWrapper patchelf unzip ];
postPatch = ''
get_file_size() {
local fname="$1"
echo $(ls -l $fname | cut -d ' ' -f5)
}
get_file_size() {
local fname="$1"
echo $(ls -l $fname | cut -d ' ' -f5)
}
munge_size_hack() {
local fname="$1"
local size="$2"
strip $fname
truncate --size=$size $fname
}
munge_size_hack() {
local fname="$1"
local size="$2"
strip $fname
truncate --size=$size $fname
}
rm -rf jbr
rm -rf jbr
interpreter=$(echo ${stdenv.cc.libc}/lib/ld-linux*.so.2)
if [[ "${stdenv.hostPlatform.system}" == "x86_64-linux" && -e bin/fsnotifier64 ]]; then
target_size=$(get_file_size bin/fsnotifier64)
patchelf --set-interpreter "$interpreter" bin/fsnotifier64
munge_size_hack bin/fsnotifier64 $target_size
else
target_size=$(get_file_size bin/fsnotifier)
patchelf --set-interpreter "$interpreter" bin/fsnotifier
munge_size_hack bin/fsnotifier $target_size
fi
interpreter=$(echo ${stdenv.cc.libc}/lib/ld-linux*.so.2)
if [[ "${stdenv.hostPlatform.system}" == "x86_64-linux" && -e bin/fsnotifier64 ]]; then
target_size=$(get_file_size bin/fsnotifier64)
patchelf --set-interpreter "$interpreter" bin/fsnotifier64
munge_size_hack bin/fsnotifier64 $target_size
else
target_size=$(get_file_size bin/fsnotifier)
patchelf --set-interpreter "$interpreter" bin/fsnotifier
munge_size_hack bin/fsnotifier $target_size
fi
'';
installPhase = ''

View File

@ -0,0 +1,122 @@
{ fetchurl
, fetchzip
, lib
, stdenv
, callPackage
, autoPatchelfHook
, glib
}:
let
pluginsJson = builtins.fromJSON (builtins.readFile ./plugins.json);
specialPluginsInfo = callPackage ./specialPlugins.nix { };
fetchPluginSrc = url: hash:
let
isJar = lib.hasSuffix ".jar" url;
fetcher = if isJar then fetchurl else fetchzip;
in
fetcher {
executable = isJar;
inherit url hash;
};
files = builtins.mapAttrs (key: value: fetchPluginSrc key value) pluginsJson.files;
ids = builtins.attrNames pluginsJson.plugins;
mkPlugin = id: file:
if !specialPluginsInfo ? "${id}"
then files."${file}"
else
stdenv.mkDerivation ({
name = "jetbrains-plugin-${id}";
installPhase = ''
runHook preInstall
mkdir -p $out && cp -r . $out
runHook postInstall
'';
src = files."${file}";
} // specialPluginsInfo."${id}");
selectFile = id: ide: build:
if !builtins.elem ide pluginsJson.plugins."${id}".compatible then
throw "Plugin with id ${id} does not support IDE ${ide}"
else if !pluginsJson.plugins."${id}".builds ? "${build}" then
throw "Jetbrains IDEs with build ${build} are not in nixpkgs. Try update_plugins.py with --with-build?"
else if pluginsJson.plugins."${id}".builds."${build}" == null then
throw "Plugin with id ${id} does not support build ${build}"
else
pluginsJson.plugins."${id}".builds."${build}";
byId = builtins.listToAttrs
(map
(id: {
name = id;
value = ide: build: mkPlugin id (selectFile id ide build);
})
ids);
byName = builtins.listToAttrs
(map
(id: {
name = pluginsJson.plugins."${id}".name;
value = byId."${id}";
})
ids);
in
rec {
# Only use if you know what youre doing
raw = { inherit files byId byName; };
addPlugins = ide: unprocessedPlugins:
let
processPlugin = plugin:
if lib.isDerivation plugin then plugin else
if byId ? "${plugin}" then byId."${plugin}" ide.pname ide.buildNumber else
if byName ? "${plugin}" then byName."${plugin}" ide.pname ide.buildNumber else
throw "Could not resolve plugin ${plugin}";
plugins = map processPlugin unprocessedPlugins;
in
stdenv.mkDerivation rec {
pname = meta.mainProgram + "-with-plugins";
version = ide.version;
src = ide;
dontInstall = true;
dontFixup = true;
passthru.plugins = plugins ++ (ide.plugins or [ ]);
newPlugins = plugins;
disallowedReferences = [ ide ];
nativeBuildInputs = [ autoPatchelfHook ] ++ (ide.nativeBuildInputs or [ ]);
buildInputs = lib.unique ((ide.buildInputs or [ ]) ++ [ glib ]);
inherit (ide) meta;
buildPhase =
let
pluginCmdsLines = map (plugin: "ln -s ${plugin} \"$out\"/${meta.mainProgram}/plugins/${baseNameOf plugin}") plugins;
pluginCmds = builtins.concatStringsSep "\n" pluginCmdsLines;
extraBuildPhase = rec {
clion = ''
sed "s|${ide}|$out|" -i $out/bin/.clion-wrapped
'';
goland = ''
sed "s|${ide}|$out|" -i $out/bin/.goland-wrapped
'';
};
in
''
cp -r ${ide} $out
chmod +w -R $out
IFS=' ' read -ra pluginArray <<< "$newPlugins"
for plugin in "''${pluginArray[@]}"
do
ln -s "$plugin" -t $out/${meta.mainProgram}/plugins/
done
sed "s|${ide.outPath}|$out|" -i $out/bin/${meta.mainProgram}
autoPatchelf $out/${meta.mainProgram}/bin
'' + (extraBuildPhase."${ide.meta.mainProgram}" or "");
};
}

View File

@ -0,0 +1,387 @@
{
"plugins": {
"164": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/164/275091/IdeaVim-2.1.0.zip",
"231.9011.31": "https://plugins.jetbrains.com/files/164/347833/IdeaVim-2.3.0-signed.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/164/347833/IdeaVim-2.3.0-signed.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/164/347833/IdeaVim-2.3.0-signed.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/164/347833/IdeaVim-2.3.0-signed.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/164/347833/IdeaVim-2.3.0-signed.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/164/347833/IdeaVim-2.3.0-signed.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/164/347833/IdeaVim-2.3.0-signed.zip"
},
"name": "ideavim"
},
"631": {
"compatible": [
"idea-ultimate"
],
"builds": {
"231.9161.38": "https://plugins.jetbrains.com/files/631/350772/python-231.9161.38.zip"
},
"name": "python"
},
"6954": {
"compatible": [
"idea-community",
"idea-ultimate"
],
"builds": {
"231.9161.38": null
},
"name": "kotlin"
},
"6981": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": null,
"231.9011.31": "https://plugins.jetbrains.com/files/6981/336613/ini-231.9011.41.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/6981/336613/ini-231.9011.41.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/6981/336613/ini-231.9011.41.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/6981/336613/ini-231.9011.41.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/6981/336613/ini-231.9011.41.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/6981/336613/ini-231.9011.41.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/6981/351503/ini-231.9161.47.zip"
},
"name": "ini"
},
"7322": {
"compatible": [
"datagrip",
"goland",
"idea-community",
"rider"
],
"builds": {
"231.9011.34": "https://plugins.jetbrains.com/files/7322/326457/python-ce-231.8770.65.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/7322/326457/python-ce-231.8770.65.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/7322/326457/python-ce-231.8770.65.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/7322/326457/python-ce-231.8770.65.zip"
},
"name": "python-community-edition"
},
"8182": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/8182/329558/intellij-rust-0.4.194.5382-223.zip",
"231.9011.31": "https://plugins.jetbrains.com/files/8182/346574/intellij-rust-0.4.196.5423-231.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/8182/346574/intellij-rust-0.4.196.5423-231.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/8182/346574/intellij-rust-0.4.196.5423-231.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/8182/346574/intellij-rust-0.4.196.5423-231.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/8182/346574/intellij-rust-0.4.196.5423-231.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/8182/346574/intellij-rust-0.4.196.5423-231.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/8182/346574/intellij-rust-0.4.196.5423-231.zip"
},
"name": "rust"
},
"8182-beta": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/8182/330017/intellij-rust-0.4.194.5384-223-beta.zip",
"231.9011.31": "https://plugins.jetbrains.com/files/8182/351209/intellij-rust-0.4.197.5433-231-beta.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/8182/351209/intellij-rust-0.4.197.5433-231-beta.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/8182/351209/intellij-rust-0.4.197.5433-231-beta.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/8182/351209/intellij-rust-0.4.197.5433-231-beta.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/8182/351209/intellij-rust-0.4.197.5433-231-beta.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/8182/351209/intellij-rust-0.4.197.5433-231-beta.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/8182/351209/intellij-rust-0.4.197.5433-231-beta.zip"
},
"name": "rust-beta"
},
"8554": {
"compatible": [
"goland",
"idea-community",
"idea-ultimate",
"pycharm-community",
"pycharm-professional",
"ruby-mine",
"webstorm"
],
"builds": {
"231.9011.34": "https://plugins.jetbrains.com/files/8554/326468/featuresTrainer-231.8770.66.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/8554/326468/featuresTrainer-231.8770.66.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/8554/326468/featuresTrainer-231.8770.66.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/8554/326468/featuresTrainer-231.8770.66.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/8554/326468/featuresTrainer-231.8770.66.zip"
},
"name": "ide-features-trainer"
},
"8607": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/8607/318851/NixIDEA-0.4.0.9.zip",
"231.9011.31": "https://plugins.jetbrains.com/files/8607/318851/NixIDEA-0.4.0.9.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/8607/318851/NixIDEA-0.4.0.9.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/8607/318851/NixIDEA-0.4.0.9.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/8607/318851/NixIDEA-0.4.0.9.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/8607/318851/NixIDEA-0.4.0.9.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/8607/318851/NixIDEA-0.4.0.9.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/8607/318851/NixIDEA-0.4.0.9.zip"
},
"name": "nixidea"
},
"9568": {
"compatible": [
"idea-ultimate"
],
"builds": {
"231.9161.38": "https://plugins.jetbrains.com/files/9568/343928/go-plugin-231.9161.14.zip"
},
"name": "go"
},
"10037": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/10037/332761/CSVEditor-3.2.0-223.zip",
"231.9011.31": "https://plugins.jetbrains.com/files/10037/332760/CSVEditor-3.2.0-231.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/10037/332760/CSVEditor-3.2.0-231.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/10037/332760/CSVEditor-3.2.0-231.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/10037/332760/CSVEditor-3.2.0-231.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/10037/332760/CSVEditor-3.2.0-231.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/10037/332760/CSVEditor-3.2.0-231.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/10037/332760/CSVEditor-3.2.0-231.zip"
},
"name": "csv-editor"
},
"12559": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/12559/257029/keymap-eclipse-223.7571.125.zip",
"231.9011.31": "https://plugins.jetbrains.com/files/12559/307825/keymap-eclipse-231.8109.91.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/12559/307825/keymap-eclipse-231.8109.91.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/12559/307825/keymap-eclipse-231.8109.91.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/12559/307825/keymap-eclipse-231.8109.91.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/12559/307825/keymap-eclipse-231.8109.91.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/12559/307825/keymap-eclipse-231.8109.91.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/12559/307825/keymap-eclipse-231.8109.91.zip"
},
"name": "eclipse-keymap"
},
"13017": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/13017/257030/keymap-visualStudio-223.7571.125.zip",
"231.9011.31": "https://plugins.jetbrains.com/files/13017/307831/keymap-visualStudio-231.8109.91.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/13017/307831/keymap-visualStudio-231.8109.91.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/13017/307831/keymap-visualStudio-231.8109.91.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/13017/307831/keymap-visualStudio-231.8109.91.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/13017/307831/keymap-visualStudio-231.8109.91.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/13017/307831/keymap-visualStudio-231.8109.91.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/13017/307831/keymap-visualStudio-231.8109.91.zip"
},
"name": "visual-studio-keymap"
},
"14059": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/14059/82616/darcula-pitch-black.jar",
"231.9011.31": "https://plugins.jetbrains.com/files/14059/82616/darcula-pitch-black.jar",
"231.9011.34": "https://plugins.jetbrains.com/files/14059/82616/darcula-pitch-black.jar",
"231.9011.35": "https://plugins.jetbrains.com/files/14059/82616/darcula-pitch-black.jar",
"231.9011.38": "https://plugins.jetbrains.com/files/14059/82616/darcula-pitch-black.jar",
"231.9011.39": "https://plugins.jetbrains.com/files/14059/82616/darcula-pitch-black.jar",
"231.9011.41": "https://plugins.jetbrains.com/files/14059/82616/darcula-pitch-black.jar",
"231.9161.38": "https://plugins.jetbrains.com/files/14059/82616/darcula-pitch-black.jar"
},
"name": "darcula-pitch-black"
},
"17718": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/17718/351707/github-copilot-intellij-1.2.9.2684.zip",
"231.9011.31": "https://plugins.jetbrains.com/files/17718/351707/github-copilot-intellij-1.2.9.2684.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/17718/351707/github-copilot-intellij-1.2.9.2684.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/17718/351707/github-copilot-intellij-1.2.9.2684.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/17718/351707/github-copilot-intellij-1.2.9.2684.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/17718/351707/github-copilot-intellij-1.2.9.2684.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/17718/351707/github-copilot-intellij-1.2.9.2684.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/17718/351707/github-copilot-intellij-1.2.9.2684.zip"
},
"name": "github-copilot"
},
"18444": {
"compatible": [
"clion",
"datagrip",
"goland",
"idea-community",
"idea-ultimate",
"mps",
"phpstorm",
"pycharm-community",
"pycharm-professional",
"rider",
"ruby-mine",
"webstorm"
],
"builds": {
"223.8836.1185": "https://plugins.jetbrains.com/files/18444/165585/NetBeans6.5Keymap.zip",
"231.9011.31": "https://plugins.jetbrains.com/files/18444/165585/NetBeans6.5Keymap.zip",
"231.9011.34": "https://plugins.jetbrains.com/files/18444/165585/NetBeans6.5Keymap.zip",
"231.9011.35": "https://plugins.jetbrains.com/files/18444/165585/NetBeans6.5Keymap.zip",
"231.9011.38": "https://plugins.jetbrains.com/files/18444/165585/NetBeans6.5Keymap.zip",
"231.9011.39": "https://plugins.jetbrains.com/files/18444/165585/NetBeans6.5Keymap.zip",
"231.9011.41": "https://plugins.jetbrains.com/files/18444/165585/NetBeans6.5Keymap.zip",
"231.9161.38": "https://plugins.jetbrains.com/files/18444/165585/NetBeans6.5Keymap.zip"
},
"name": "netbeans-6-5-keymap"
}
},
"files": {
"https://plugins.jetbrains.com/files/10037/332760/CSVEditor-3.2.0-231.zip": "sha256-TZs6ColXUvrp2jw74h8M+6UhSqi9u/gDXlzTNhIt+oo=",
"https://plugins.jetbrains.com/files/10037/332761/CSVEditor-3.2.0-223.zip": "sha256-m52ukvz7pqOBPoyNr5l58glD19wXluguZVQKYajCYN8=",
"https://plugins.jetbrains.com/files/12559/257029/keymap-eclipse-223.7571.125.zip": "sha256-0hMn8Qt+xJjB9HnYz7OMw8xmI0FxDFy+lYfXHURhTKY=",
"https://plugins.jetbrains.com/files/12559/307825/keymap-eclipse-231.8109.91.zip": "sha256-8jUsRK4evNMzjuWQIjIMrvQ0sIXPoY1C/buu1nod5X8=",
"https://plugins.jetbrains.com/files/13017/257030/keymap-visualStudio-223.7571.125.zip": "sha256-YiJALivO1a+I4bCtZEv68PZ21Vydk5UW6gAgErj28DQ=",
"https://plugins.jetbrains.com/files/13017/307831/keymap-visualStudio-231.8109.91.zip": "sha256-b/SFrQX+pIV/R/Dd72EjqbbRgaSgppe3kv4aSxWr//Y=",
"https://plugins.jetbrains.com/files/14059/82616/darcula-pitch-black.jar": "sha256-eXInfAqY3yEZRXCAuv3KGldM1pNKEioNwPB0rIGgJFw=",
"https://plugins.jetbrains.com/files/164/275091/IdeaVim-2.1.0.zip": "sha256-2dM/r79XT+1MHDeRAUnZw6WO3dmw7MZfx9alHmBqMk0=",
"https://plugins.jetbrains.com/files/164/347833/IdeaVim-2.3.0-signed.zip": "sha256-K4HQXGdvFhs7X25Kw+pljep/lqJ9lwewnGSEvbnNetE=",
"https://plugins.jetbrains.com/files/17718/351707/github-copilot-intellij-1.2.9.2684.zip": "sha256-imh+3U+HWM9jia2HfRXInHl1pfw+T6D4ls3DGqbqbsw=",
"https://plugins.jetbrains.com/files/18444/165585/NetBeans6.5Keymap.zip": "sha256-KrzZTKZMQqoEMw+vDUv2jjs0EX0leaPBkU8H/ecq/oI=",
"https://plugins.jetbrains.com/files/631/350772/python-231.9161.38.zip": "sha256-vQfCR7WMrknRminRcd0AoGrxofAf5dcD8/aXLwWBo3k=",
"https://plugins.jetbrains.com/files/6981/336613/ini-231.9011.41.zip": "sha256-PtBDN+FNA518HaewPIr9pq5S3Z9RGSCA2NT+YnZ0l8c=",
"https://plugins.jetbrains.com/files/6981/351503/ini-231.9161.47.zip": "sha256-oAgTPyTnfqEKjaGcK50k9O16hDY+A4lfL2l9IpGKyCY=",
"https://plugins.jetbrains.com/files/7322/326457/python-ce-231.8770.65.zip": "sha256-LjHpwdBtC4C9KXrHQ+EvmGL1A+Tfbqzc17Kf80SP/lE=",
"https://plugins.jetbrains.com/files/8182/329558/intellij-rust-0.4.194.5382-223.zip": "sha256-AgaKH4ZaxLhumk1P9BVJGpvluKnpYIulCDIRQpaWlKA=",
"https://plugins.jetbrains.com/files/8182/330017/intellij-rust-0.4.194.5384-223-beta.zip": "sha256-+iYFqpc4Qn+KGWX3IXpM1sHQV+IPYJZBLFNo0kdx8oE=",
"https://plugins.jetbrains.com/files/8182/346574/intellij-rust-0.4.196.5423-231.zip": "sha256-dyJc5O06QLNLQ/D1tX9cGRLqalPX4prcRXz0WcD2RU4=",
"https://plugins.jetbrains.com/files/8182/351209/intellij-rust-0.4.197.5433-231-beta.zip": "sha256-P/8tr5n8yVFFTLB4ML2tobJqeuxHWkkEargMjVpnF2Y=",
"https://plugins.jetbrains.com/files/8554/326468/featuresTrainer-231.8770.66.zip": "sha256-N5woM9O9y+UequeWcjCLL93rjHDW0Tnvh8h3iLrwmjk=",
"https://plugins.jetbrains.com/files/8607/318851/NixIDEA-0.4.0.9.zip": "sha256-byShwSfnAG8kXhoNu7CfOwvy4Viav784NT0UmzKY6hQ=",
"https://plugins.jetbrains.com/files/9568/343928/go-plugin-231.9161.14.zip": "sha256-67SuJKJZEzEYojsL33zvtWArvADkkjd643cVb4s9EUk="
}
}

View File

@ -0,0 +1,63 @@
{ delve, autoPatchelfHook, stdenv, lib, glibc, gcc-unwrapped }:
# This is a list of plugins that need special treatment. For example, the go plugin (id is 9568) comes with delve, a
# debugger, but that needs various linking fixes. The changes here replace it with the system one.
{
"631" = {
# Python
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
};
"7322" = {
# Python community edition
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
};
"8182" = {
# Rust
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
buildPhase = ''
runHook preBuild
chmod +x -R bin
runHook postBuild
'';
};
"9568" = {
# Go
buildInputs = [ delve ];
buildPhase =
let
arch = (if stdenv.isLinux then "linux" else "mac") + (if stdenv.isAarch64 then "arm" else "");
in ''
runHook preBuild
ln -sf ${delve}/bin/dlv lib/dlv/${arch}/dlv
runHook postBuild
'';
};
"17718" = {
# Github Copilot
# Modified version of https://github.com/ktor/nixos/commit/35f4071faab696b2a4d86643726c9dd3e4293964
buildPhase = ''
agent="copilot-agent/bin/copilot-agent-linux"
orig_size=$(stat --printf=%s $agent)
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $agent
patchelf --set-rpath ${lib.makeLibraryPath [glibc gcc-unwrapped]} $agent
chmod +x $agent
new_size=$(stat --printf=%s $agent)
var_skip=20
var_select=22
shift_by=$(($new_size-$orig_size))
function fix_offset {
# $1 = name of variable to adjust
location=$(grep -obUam1 "$1" $agent | cut -d: -f1)
location=$(expr $location + $var_skip)
value=$(dd if=$agent iflag=count_bytes,skip_bytes skip=$location \
bs=1 count=$var_select status=none)
value=$(expr $shift_by + $value)
echo -n $value | dd of=$agent bs=1 seek=$location conv=notrunc
}
fix_offset PAYLOAD_POSITION
fix_offset PRELUDE_POSITION
'';
};
}

View File

@ -0,0 +1,385 @@
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3 python3.pkgs.requests nix.out
from json import load, dumps
from pathlib import Path
from requests import get
from subprocess import run
from argparse import ArgumentParser
# Token priorities for version checking
# From https://github.com/JetBrains/intellij-community/blob/94f40c5d77f60af16550f6f78d481aaff8deaca4/platform/util-rt/src/com/intellij/util/text/VersionComparatorUtil.java#L50
TOKENS = {
"snap": 10, "snapshot": 10,
"m": 20,
"eap": 25, "pre": 25, "preview": 25,
"alpha": 30, "a": 30,
"beta": 40, "betta": 40, "b": 40,
"rc": 50,
"sp": 70,
"rel": 80, "release": 80, "r": 80, "final": 80
}
SNAPSHOT_VALUE = 99999
PLUGINS_FILE = Path(__file__).parent.joinpath("plugins.json").resolve()
IDES_FILE = Path(__file__).parent.joinpath("../versions.json").resolve()
# The plugin compatibility system uses a different naming scheme to the ide update system.
# These dicts convert between them
FRIENDLY_TO_PLUGIN = {
"clion": "CLION",
"datagrip": "DBE",
"goland": "GOLAND",
"idea-community": "IDEA_COMMUNITY",
"idea-ultimate": "IDEA",
"mps": "MPS",
"phpstorm": "PHPSTORM",
"pycharm-community": "PYCHARM_COMMUNITY",
"pycharm-professional": "PYCHARM",
"rider": "RIDER",
"ruby-mine": "RUBYMINE",
"webstorm": "WEBSTORM"
}
PLUGIN_TO_FRIENDLY = {j: i for i, j in FRIENDLY_TO_PLUGIN.items()}
def tokenize_stream(stream):
for item in stream:
if item in TOKENS:
yield TOKENS[item], 0
elif item.isalpha():
for char in item:
yield 90, ord(char) - 96
elif item.isdigit():
yield 100, int(item)
def split(version_string: str):
prev_type = None
block = ""
for char in version_string:
if char.isdigit():
cur_type = "number"
elif char.isalpha():
cur_type = "letter"
else:
cur_type = "other"
if cur_type != prev_type and block:
yield block.lower()
block = ""
if cur_type in ("letter", "number"):
block += char
prev_type = cur_type
if block:
yield block
def tokenize_string(version_string: str):
return list(tokenize_stream(split(version_string)))
def pick_newest(ver1: str, ver2: str) -> str:
if ver1 is None or ver1 == ver2:
return ver2
if ver2 is None:
return ver1
presort = [tokenize_string(ver1), tokenize_string(ver2)]
postsort = sorted(presort)
if presort == postsort:
return ver2
else:
return ver1
def is_build_older(ver1: str, ver2: str) -> int:
ver1 = [int(i) for i in ver1.replace("*", str(SNAPSHOT_VALUE)).split(".")]
ver2 = [int(i) for i in ver2.replace("*", str(SNAPSHOT_VALUE)).split(".")]
for i in range(min(len(ver1), len(ver2))):
if ver1[i] == ver2[i] and ver1[i] == SNAPSHOT_VALUE:
return 0
if ver1[i] == SNAPSHOT_VALUE:
return 1
if ver2[i] == SNAPSHOT_VALUE:
return -1
result = ver1[i] - ver2[i]
if result != 0:
return result
return len(ver1) - len(ver2)
def is_compatible(build, since, until) -> bool:
return (not since or is_build_older(since, build) < 0) and (not until or 0 < is_build_older(until, build))
def get_newest_compatible(pid: str, build: str, plugin_infos: dict, quiet: bool) -> [None, str]:
newest_ver = None
newest_index = None
for index, info in enumerate(plugin_infos):
if pick_newest(newest_ver, info["version"]) != newest_ver and \
is_compatible(build, info["since"], info["until"]):
newest_ver = info["version"]
newest_index = index
if newest_ver is not None:
return "https://plugins.jetbrains.com/files/" + plugin_infos[newest_index]["file"]
else:
if not quiet:
print(f"WARNING: Could not find version of plugin {pid} compatible with build {build}")
return None
def flatten(main_list: list[list]) -> list:
return [item for sublist in main_list for item in sublist]
def get_compatible_ides(pid: str) -> list[str]:
int_id = pid.split("-", 1)[0]
url = f"https://plugins.jetbrains.com/api/plugins/{int_id}/compatible-products"
result = get(url).json()
return sorted([PLUGIN_TO_FRIENDLY[i] for i in result if i in PLUGIN_TO_FRIENDLY])
def id_to_name(pid: str, channel="") -> str:
channel_ext = "-" + channel if channel else ""
resp = get("https://plugins.jetbrains.com/api/plugins/" + pid).json()
return resp["link"].split("-", 1)[1] + channel_ext
def sort_dict(to_sort: dict) -> dict:
return {i: to_sort[i] for i in sorted(to_sort.keys())}
def make_name_mapping(infos: dict) -> dict[str, str]:
return sort_dict({i: id_to_name(*i.split("-", 1)) for i in infos.keys()})
def make_plugin_files(plugin_infos: dict, ide_versions: dict, quiet: bool, extra_builds: list[str]) -> dict:
result = {}
names = make_name_mapping(plugin_infos)
for pid in plugin_infos:
plugin_versions = {
"compatible": get_compatible_ides(pid),
"builds": {},
"name": names[pid]
}
relevant_builds = [builds for ide, builds in ide_versions.items() if ide in plugin_versions["compatible"]] + [extra_builds]
relevant_builds = sorted(list(set(flatten(relevant_builds)))) # Flatten, remove duplicates and sort
for build in relevant_builds:
plugin_versions["builds"][build] = get_newest_compatible(pid, build, plugin_infos[pid], quiet)
result[pid] = plugin_versions
return result
def get_old_file_hashes() -> dict[str, str]:
return load(open(PLUGINS_FILE))["files"]
def get_hash(url):
print(f"Downloading {url}")
args = ["nix-prefetch-url", url, "--print-path"]
if url.endswith(".zip"):
args.append("--unpack")
else:
args.append("--executable")
path_process = run(args, capture_output=True)
path = path_process.stdout.decode().split("\n")[1]
result = run(["nix", "--extra-experimental-features", "nix-command", "hash", "path", path], capture_output=True)
result_contents = result.stdout.decode()[:-1]
if not result_contents:
raise RuntimeError(result.stderr.decode())
return result_contents
def print_file_diff(old, new):
added = new.copy()
removed = old.copy()
to_delete = []
for file in added:
if file in removed:
to_delete.append(file)
for file in to_delete:
added.remove(file)
removed.remove(file)
if removed:
print("\nRemoved:")
for file in removed:
print(" - " + file)
print()
if added:
print("\nAdded:")
for file in added:
print(" + " + file)
print()
def get_file_hashes(file_list: list[str], refetch_all: bool) -> dict[str, str]:
old = {} if refetch_all else get_old_file_hashes()
print_file_diff(list(old.keys()), file_list)
file_hashes = {}
for file in sorted(file_list):
if file in old:
file_hashes[file] = old[file]
else:
file_hashes[file] = get_hash(file)
return file_hashes
def get_args() -> tuple[list[str], list[str], bool, bool, bool, list[str]]:
parser = ArgumentParser(
description="Add/remove/update entries in plugins.json",
epilog="To update all plugins, run with no args.\n"
"To add a version of a plugin from a different channel, append -[channel] to the id.\n"
"The id of a plugin is the number before the name in the address of its page on https://plugins.jetbrains.com/"
)
parser.add_argument("-r", "--refetch-all", action="store_true",
help="don't use previously collected hashes, redownload all")
parser.add_argument("-l", "--list", action="store_true",
help="list plugin ids")
parser.add_argument("-q", "--quiet", action="store_true",
help="suppress warnings about not being able to find compatible plugin versions")
parser.add_argument("-w", "--with-build", action="append", default=[],
help="append [builds] to the list of builds to fetch plugin versions for")
sub = parser.add_subparsers(dest="action")
sub.add_parser("add").add_argument("ids", type=str, nargs="+", help="plugin(s) to add")
sub.add_parser("remove").add_argument("ids", type=str, nargs="+", help="plugin(s) to remove")
args = parser.parse_args()
add = []
remove = []
if args.action == "add":
add = args.ids
elif args.action == "remove":
remove = args.ids
return add, remove, args.refetch_all, args.list, args.quiet, args.with_build
def sort_ids(ids: list[str]) -> list[str]:
sortable_ids = []
for pid in ids:
if "-" in pid:
split_pid = pid.split("-", 1)
sortable_ids.append((int(split_pid[0]), split_pid[1]))
else:
sortable_ids.append((int(pid), ""))
sorted_ids = sorted(sortable_ids)
return [(f"{i}-{j}" if j else str(i)) for i, j in sorted_ids]
def get_plugin_ids(add: list[str], remove: list[str]) -> list[str]:
ids = list(load(open(PLUGINS_FILE))["plugins"].keys())
for pid in add:
if pid in ids:
raise ValueError(f"ID {pid} already in JSON file")
ids.append(pid)
for pid in remove:
try:
ids.remove(pid)
except ValueError:
raise ValueError(f"ID {pid} not in JSON file")
return sort_ids(ids)
def get_plugin_info(pid: str, channel: str) -> dict:
url = f"https://plugins.jetbrains.com/api/plugins/{pid}/updates?channel={channel}"
resp = get(url)
decoded = resp.json()
if resp.status_code != 200:
print(f"Server gave non-200 code {resp.status_code} with message " + decoded["message"])
exit(1)
return decoded
def ids_to_infos(ids: list[str]) -> dict:
result = {}
for pid in ids:
if "-" in pid:
int_id, channel = pid.split("-", 1)
else:
channel = ""
int_id = pid
result[pid] = get_plugin_info(int_id, channel)
return result
def get_ide_versions() -> dict:
ide_data = load(open(IDES_FILE))
result = {}
for platform in ide_data:
for product in ide_data[platform]:
version = ide_data[platform][product]["build_number"]
if product not in result:
result[product] = [version]
elif version not in result[product]:
result[product].append(version)
# Gateway isn't a normal IDE, so it doesn't use the same plugins system
del result["gateway"]
return result
def get_file_names(plugins: dict[str, dict]) -> list[str]:
result = []
for plugin_info in plugins.values():
for url in plugin_info["builds"].values():
if url is not None:
result.append(url)
return list(set(result))
def dump(obj, file):
file.write(dumps(obj, indent=2))
file.write("\n")
def write_result(to_write):
dump(to_write, open(PLUGINS_FILE, "w"))
def main():
add, remove, refetch_all, list_ids, quiet, extra_builds = get_args()
result = {}
print("Fetching plugin info")
ids = get_plugin_ids(add, remove)
if list_ids:
print(*ids)
plugin_infos = ids_to_infos(ids)
print("Working out which plugins need which files")
ide_versions = get_ide_versions()
result["plugins"] = make_plugin_files(plugin_infos, ide_versions, quiet, extra_builds)
print("Getting file hashes")
file_list = get_file_names(result["plugins"])
result["files"] = get_file_hashes(file_list, refetch_all)
write_result(result)
if __name__ == '__main__':
main()

View File

@ -23,11 +23,11 @@
stdenv.mkDerivation rec {
pname = "vkdt";
version = "0.5.4";
version = "0.6.0";
src = fetchurl {
url = "https://github.com/hanatos/${pname}/releases/download/${version}/${pname}-${version}.tar.xz";
sha256 = "sha256-lyljfJ4RZETEED4bofC/Rq88PMNhoHO1kgHmmaXPuhM=";
sha256 = "sha256-Au0S+9Y+H0FuoHZacnN4azQFQB0tarT2bHNsLxujfLw=";
};
strictDeps = true;

View File

@ -6,19 +6,19 @@
stdenv.mkDerivation (finalAttrs: {
pname = "furtherance";
version = "1.8.0";
version = "1.8.1";
src = fetchFromGitHub {
owner = "lakoliu";
repo = "Furtherance";
rev = "v${finalAttrs.version}";
hash = "sha256-l62k7aFyKfYWO+Z85KR8tpwts28pamINHYp/oKuHkhc=";
hash = "sha256-KNC0e1Qfls+TcUDPvLaTWWF4ELBJYPE7Oo9/4PK10js=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit (finalAttrs) src;
name = "${finalAttrs.pname}-${finalAttrs.version}";
hash = "sha256-AuXSX+64rJcTChpsE5tqk67bihKkSyimFAMhb1VdbBs=";
hash = "sha256-NHrKk7XgqeEuNAOyIDfzFJzIExTpUfv83Pdv/NPkgYQ=";
};
nativeBuildInputs = [

View File

@ -1,14 +1,14 @@
{ lib, buildGoModule, fetchurl, fetchFromGitHub }:
let
version = "1.8.0";
version = "1.8.2";
# TODO: must build the extension instead of downloading it. But since it's
# literally an asset that is indifferent regardless of the platform, this
# might be just enough.
webext = fetchurl {
url = "https://github.com/browsh-org/browsh/releases/download/v${version}/browsh-${version}.xpi";
sha256 = "sha256-12xWbf4ngYHWLKV9yyxyi0Ny/zHSj2o7Icats+Ef+pA=";
hash = "sha256-04rLyQt8co3Z7UJnDJmj++E4n7of0Zh1jQ90Bfwnx5A=";
};
in
@ -24,10 +24,10 @@ buildGoModule rec {
owner = "browsh-org";
repo = "browsh";
rev = "v${version}";
sha256 = "sha256-/tH1w6qi+rimsqtk8Y8AYljU3X4vbmoDtV07piWSBdw=";
hash = "sha256-KbBVcNuERBL94LuRx872zpjQTzR6c5GalsBoNR52SuQ=";
};
vendorSha256 = "sha256-eCvV3UuM/JtCgMqvwvqWF3bpOmPSos5Pfhu6ETaS58c=";
vendorHash = "sha256-eCvV3UuM/JtCgMqvwvqWF3bpOmPSos5Pfhu6ETaS58c=";
preBuild = ''
cp "${webext}" src/browsh/browsh.xpi

View File

@ -110,13 +110,13 @@
"vendorHash": null
},
"aws": {
"hash": "sha256-MT/A2P2E/fQUUClwBnDGff0i39iNjN4pMdtazHjgCkA=",
"hash": "sha256-ZKP0Y65GgOxF9IIPR9YIkpm7+fanNuvWPKNBk8XY0ec=",
"homepage": "https://registry.terraform.io/providers/hashicorp/aws",
"owner": "hashicorp",
"repo": "terraform-provider-aws",
"rev": "v5.6.1",
"rev": "v5.6.2",
"spdx": "MPL-2.0",
"vendorHash": "sha256-y+X4sSWkcGcQfDUomdCUOkogNglahRTCx7bbABY9GXs="
"vendorHash": "sha256-ucMaOdELGc71QDlEa3lYJU3HkmE85XFHgWBUT+Ds3EM="
},
"azuread": {
"hash": "sha256-wBNS2a6O1QJgssbAWhSRSfxaVZ35zgT/qNdpE++NQ8U=",
@ -547,11 +547,11 @@
"vendorHash": "sha256-hxT9mpKifb63wlCUeUzgVo4UB2TnYZy9lXF4fmGYpc4="
},
"huaweicloud": {
"hash": "sha256-ullp0qBo2BFokbXMek5Y5s7qN2Ig3L5ekXSlbLhvrWU=",
"hash": "sha256-aGivt0XfePNvac+YDS85CfsCiu4NXoah/M+sMfsnWi4=",
"homepage": "https://registry.terraform.io/providers/huaweicloud/huaweicloud",
"owner": "huaweicloud",
"repo": "terraform-provider-huaweicloud",
"rev": "v1.50.0",
"rev": "v1.51.0",
"spdx": "MPL-2.0",
"vendorHash": null
},
@ -989,13 +989,13 @@
"vendorHash": null
},
"selectel": {
"hash": "sha256-Mpf7BcT7uRqqDNHk+IqfjIuRgrzMMcGn71exKBbymd8=",
"hash": "sha256-oA//8+TedHk1zB4xj47kUNVEYXaMhEGas72xjU2uVHk=",
"homepage": "https://registry.terraform.io/providers/selectel/selectel",
"owner": "selectel",
"repo": "terraform-provider-selectel",
"rev": "v3.10.0",
"rev": "v3.11.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-mIIp9+jGfCEe2HFdlARVFldNYBNPTRP8s/G0/URgxVA="
"vendorHash": "sha256-3oVyxtl/d9coyNDk2Cj3WnkVUAsW56YZPXhUXL3DJGk="
},
"sentry": {
"hash": "sha256-L/aZ4/xCVZk3C6AGglzCj5T9XnoI/uiLbRASNAHwcro=",
@ -1052,13 +1052,13 @@
"vendorHash": "sha256-NO1r/EWLgH1Gogru+qPeZ4sW7FuDENxzNnpLSKstnE8="
},
"spotinst": {
"hash": "sha256-6hiyVMN9LoMLYs5Nuj1tcvQtfQABRqvB1KJmAu7hn48=",
"hash": "sha256-WQhz7IgIJS4Xf3u9fFqQNNgStbXkd64ri2Zf/C90DMY=",
"homepage": "https://registry.terraform.io/providers/spotinst/spotinst",
"owner": "spotinst",
"repo": "terraform-provider-spotinst",
"rev": "v1.124.0",
"rev": "v1.125.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-zjQLAT3GQbOn7Riltoy8QHnlGp5GwwmjdwMudOMaJho="
"vendorHash": "sha256-cT/85DbG5U/JPA+rgJ2BhxJA90KBKjg+X+glREiezAg="
},
"stackpath": {
"hash": "sha256-7KQUddq+M35WYyAIAL8sxBjAaXFcsczBRO1R5HURUZg=",
@ -1106,11 +1106,11 @@
"vendorHash": "sha256-GNSKSlaFBj2P+z40U+0uwPSOuQBy+9vOVFfPe8p0A24="
},
"tencentcloud": {
"hash": "sha256-C8U1SQhoDVFeBHOmXdeF4GAjhKyejECNURJVfloOAZM=",
"hash": "sha256-NuNgYnP9zLYjO+b1Mld1MbmqdCaTi5KoOXAhYss5ZPc=",
"homepage": "https://registry.terraform.io/providers/tencentcloudstack/tencentcloud",
"owner": "tencentcloudstack",
"repo": "terraform-provider-tencentcloud",
"rev": "v1.81.9",
"rev": "v1.81.10",
"spdx": "MPL-2.0",
"vendorHash": null
},

View File

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "nchat";
version = "3.39";
version = "3.60";
src = fetchFromGitHub {
owner = "d99kris";
repo = "nchat";
rev = "v${version}";
hash = "sha256-ZV2vpXztvBDN66OPLpO/ezLB4+/3NOOs1Eky8uXxBbc=";
hash = "sha256-Fe+Cdh8NlrCkzSO/Juw96eXtGfXajhFIsKeTC3qXIlU=";
};
postPatch = ''

View File

@ -1,6 +1,6 @@
{ lib
, stdenv
, fetchzip
, fetchsvn
, pkg-config
, autoreconfHook
, bison
@ -8,14 +8,15 @@
, glib
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "mswatch";
# Stable release won't compile successfully
version = "unstable-2018-11-21";
src = fetchzip {
url = "https://sourceforge.net/code-snapshots/svn/m/ms/mswatch/code/mswatch-code-r369-trunk.zip";
hash = "sha256-czwwhchTizfgVmeknQGLijYgaFSP/45pD2yhDKj5BKw=";
src = fetchsvn {
url = "svn://svn.code.sf.net/p/mswatch/code/trunk";
rev = "369";
sha256 = "sha256-czwwhchTizfgVmeknQGLijYgaFSP/45pD2yhDKj5BKw=";
};
nativeBuildInputs = [
pkg-config
@ -28,7 +29,7 @@ stdenv.mkDerivation rec {
];
meta = with lib; {
description = "A command-line Linux utility that efficiently directs mail synchronization between a pair of mailboxes.";
description = "A command-line Linux utility that efficiently directs mail synchronization between a pair of mailboxes";
homepage = "https://mswatch.sourceforge.net/";
license = licenses.gpl2Plus;
platforms = platforms.linux;

View File

@ -104,7 +104,7 @@ rustPlatform.buildRustPackage rec {
# As a workaround, strip manually before running patchelf.
$STRIP -S $out/bin/alacritty
patchelf --set-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
patchelf --add-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/alacritty
''
) + ''

View File

@ -5,11 +5,11 @@
stdenvNoCC.mkDerivation rec {
pname = "lxgw-neoxihei";
version = "1.101";
version = "1.102.1";
src = fetchurl {
url = "https://github.com/lxgw/LxgwNeoXiHei/releases/download/v${version}/LXGWNeoXiHei.ttf";
hash = "sha256-6zce11KtVKpjjzXkXYzBjfqME55LRvkpS28ZrcLo4W0=";
hash = "sha256-prEyymKABhu7/jdiyUyZ4xb6rrYmo91Jt462qQKV9/0=";
};
dontUnpack = true;

View File

@ -16,13 +16,13 @@ lib.checkListOfEnum "${pname}: color variants" [ "standard" "Amethyst" "Beryl" "
stdenvNoCC.mkDerivation rec {
inherit pname;
version = "2023-01-18";
version = "2023-06-26";
src = fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = version;
sha256 = "5EgTWF6qu12VYVi7w5BOp7IleN4IevLZR0hH9x/qbGo=";
sha256 = "5pTYsWdmjSDyrEK+Jbg/9dQ1FHI2rdnr1n0Ysd5mg/U=";
};
nativeBuildInputs = [

View File

@ -7,25 +7,25 @@
let
# make install will use dconf to find desktop background file uri.
# consider adding an args to allow specify pictures manually.
# https://github.com/daniruiz/flat-remix-gnome/blob/20230508/Makefile#L38
# https://github.com/daniruiz/flat-remix-gnome/blob/20230606/Makefile#L38
fake-dconf = writeScriptBin "dconf" "echo -n";
in
stdenv.mkDerivation rec {
pname = "flat-remix-gnome";
version = "20230508";
version = "20230606";
src = fetchFromGitHub {
owner = "daniruiz";
repo = pname;
rev = version;
hash = "sha256-MMWLSpGMvHFu3gZzU3IlfNxLY6ItMtxGLZltTJZXYaw=";
hash = "sha256-NnCRWADyAOR5yyOjB18zSQov+5FfKhhCSkDXBAL80wo=";
};
nativeBuildInputs = [ glib fake-dconf ];
makeFlags = [ "PREFIX=$(out)" ];
# make install will back up this file, it will fail if the file doesn't exist.
# https://github.com/daniruiz/flat-remix-gnome/blob/20230508/Makefile#L56
# https://github.com/daniruiz/flat-remix-gnome/blob/20230606/Makefile#L56
preInstall = ''
mkdir -p $out/share/gnome-shell/
touch $out/share/gnome-shell/gnome-shell-theme.gresource

View File

@ -1,29 +1,22 @@
{ lib, stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkg-config, gtk-doc
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, gtk-doc
, docbook_xml_dtd_43, python3, gobject-introspection, glib, udev, kmod, parted
, cryptsetup, lvm2, dmraid, util-linux, libbytesize, libndctl, nss, volume_key
, libxslt, docbook_xsl, gptfdisk, libyaml, autoconf-archive
, thin-provisioning-tools, makeWrapper
, thin-provisioning-tools, makeWrapper, e2fsprogs, libnvme, keyutils
}:
stdenv.mkDerivation rec {
pname = "libblockdev";
version = "2.28";
version = "3.0";
src = fetchFromGitHub {
owner = "storaged-project";
repo = "libblockdev";
rev = "${version}-1";
sha256 = "sha256-6MrM3psLqMcpf4haaEHg3FwrhUDz5h/DeY1w96T0UlE=";
sha256 = "sha256-pdS3rMqAgNdYSyXN2ItvOmDO9MEEiHTgPWFVc24N6VE=";
};
outputs = [ "out" "dev" "devdoc" ];
patches = [
(substituteAll {
src = ./fix-paths.patch;
sgdisk = "${gptfdisk}/bin/sgdisk";
})
];
postPatch = ''
patchShebangs scripts
'';
@ -34,8 +27,8 @@ stdenv.mkDerivation rec {
];
buildInputs = [
glib udev kmod parted gptfdisk cryptsetup lvm2 dmraid util-linux libbytesize
libndctl nss volume_key libyaml
e2fsprogs glib udev keyutils kmod parted gptfdisk cryptsetup lvm2 util-linux libbytesize
libndctl libnvme nss volume_key libyaml
];
postInstall = ''

View File

@ -1,47 +0,0 @@
--- a/src/plugins/part.c
+++ b/src/plugins/part.c
@@ -146,7 +146,7 @@ static GMutex deps_check_lock;
#define DEPS_LAST 2
static const UtilDep deps[DEPS_LAST] = {
- {"sgdisk", "0.8.6", NULL, "GPT fdisk \\(sgdisk\\) version ([\\d\\.]+)"},
+ {"@sgdisk@", "0.8.6", NULL, "GPT fdisk \\(sgdisk\\) version ([\\d\\.]+)"},
{"sfdisk", NULL, NULL, NULL},
};
@@ -355,7 +355,7 @@ gboolean bd_part_create_table (const gchar *disk, BDPartTableType type, gboolean
}
static gchar* get_part_type_guid_and_gpt_flags (const gchar *device, int part_num, guint64 *flags, GError **error) {
- const gchar *args[4] = {"sgdisk", NULL, device, NULL};
+ const gchar *args[4] = {"@sgdisk@", NULL, device, NULL};
gchar *output = NULL;
gchar **lines = NULL;
gchar **line_p = NULL;
@@ -1325,7 +1325,7 @@ gboolean bd_part_resize_part (const gchar *disk, const gchar *part, guint64 size
static gboolean set_gpt_flag (const gchar *device, int part_num, BDPartFlag flag, gboolean state, GError **error) {
- const gchar *args[5] = {"sgdisk", "--attributes", NULL, device, NULL};
+ const gchar *args[5] = {"@sgdisk@", "--attributes", NULL, device, NULL};
int bit_num = 0;
gboolean success = FALSE;
@@ -1351,7 +1351,7 @@ static gboolean set_gpt_flag (const gchar *device, int part_num, BDPartFlag flag
}
static gboolean set_gpt_flags (const gchar *device, int part_num, guint64 flags, GError **error) {
- const gchar *args[5] = {"sgdisk", "--attributes", NULL, device, NULL};
+ const gchar *args[5] = {"@sgdisk@", "--attributes", NULL, device, NULL};
guint64 real_flags = 0;
gchar *mask_str = NULL;
gboolean success = FALSE;
@@ -1791,7 +1791,7 @@ gboolean bd_part_set_part_name (const gchar *disk, const gchar *part, const gcha
* Tech category: %BD_PART_TECH_GPT-%BD_PART_TECH_MODE_MODIFY_PART
*/
gboolean bd_part_set_part_type (const gchar *disk, const gchar *part, const gchar *type_guid, GError **error) {
- const gchar *args[5] = {"sgdisk", "--typecode", NULL, disk, NULL};
+ const gchar *args[5] = {"@sgdisk@", "--typecode", NULL, disk, NULL};
const gchar *part_num_str = NULL;
gboolean success = FALSE;
guint64 progress_id = 0;

View File

@ -12,13 +12,13 @@
mkDerivation rec {
pname = "maui-core";
version = "0.5.6";
version = "0.6.6";
src = fetchFromGitHub {
owner = "Nitrux";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-58ja76N7LrJ0f/SsNMYr7Z9hdW60PwsNlTkHQ+NEdUM=";
sha256 = "sha256-o0Xwh9w0cClMw85FwpQB9CNWoSnzARxs6aGfvCA4BhA=";
};
nativeBuildInputs = [

View File

@ -15,7 +15,7 @@
buildPythonPackage rec {
pname = "bellows";
version = "0.35.5";
version = "0.35.8";
format = "setuptools";
disabled = pythonOlder "3.8";
@ -24,7 +24,7 @@ buildPythonPackage rec {
owner = "zigpy";
repo = "bellows";
rev = "refs/tags/${version}";
hash = "sha256-JpRL4RxVcH+hzz7YTlRw+FHH95RavS/m1HWyBiLLWME=";
hash = "sha256-N0Rxa685jWAvlvCTUw3SKF+VqnkIaKyXPU58o9VOrjE=";
};
propagatedBuildInputs = [

View File

@ -30,7 +30,7 @@
buildPythonPackage rec {
pname = "elastic-apm";
version = "6.16.1";
version = "6.16.2";
format = "setuptools";
disabled = pythonOlder "3.8";
@ -39,7 +39,7 @@ buildPythonPackage rec {
owner = "elastic";
repo = "apm-agent-python";
rev = "refs/tags/v${version}";
hash = "sha256-m/PjL8pltUpv/ewE/gksISsOhEVsyeWoq6yfd5c1j6s=";
hash = "sha256-JhpPreZg7DV8wTPKc7CUP+yh1LJOyc3Oa/IV3x/JMuQ=";
};
propagatedBuildInputs = [

View File

@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "gitignore-parser";
version = "0.1.3";
version = "0.1.4";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -16,7 +16,7 @@ buildPythonPackage rec {
owner = "mherrmann";
repo = "gitignore_parser";
rev = "refs/tags/v${version}";
hash = "sha256-AWLiwF+8CfiD4uT6uV5drCLtnQT+r5VTPo53T7w0SiM=";
hash = "sha256-kc1Y3kHcVVao9zqQMbUeMi/9s+W2aUAapCx3h8VyWRQ=";
};
nativeCheckInputs = [

View File

@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "graphtage";
version = "0.2.8";
version = "0.2.9";
disabled = pythonOlder "3.6";
@ -22,7 +22,7 @@ buildPythonPackage rec {
owner = "trailofbits";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-qp3NMN/aeWhr4z6qqh/s4OHebQccyIjSzWIy7P1RruI=";
hash = "sha256-GK83qSXFSCK/tiIfNfsaDfViDVzdhQNT90kB9wiTLbk=";
};
postPatch = ''

View File

@ -9,14 +9,16 @@
buildPythonPackage rec {
pname = "hexbytes";
version = "0.3.0";
disabled = pythonOlder "3.6";
version = "0.3.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ethereum";
repo = "hexbytes";
rev = "v${version}";
hash = "sha256-EDFE5MUc+XMwe8BaXkz/DRchAZbS86X+AcShi5rx83M=";
rev = "refs/tags/v${version}";
hash = "sha256-19oY/VPP6qkxHCkIgpC28fOOYKEYcNbVVGoHJmMmOl8=";
};
nativeCheckInputs = [
@ -25,11 +27,14 @@ buildPythonPackage rec {
pytestCheckHook
];
pythonImportsCheck = [ "hexbytes" ];
pythonImportsCheck = [
"hexbytes"
];
meta = with lib; {
description = "`bytes` subclass that decodes hex, with a readable console output";
homepage = "https://github.com/ethereum/hexbytes";
changelog = "https://github.com/ethereum/hexbytes/blob/v${version}/docs/release_notes.rst";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};

View File

@ -20,7 +20,7 @@
buildPythonPackage rec {
pname = "mmengine";
version = "0.7.3";
version = "0.7.4";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -29,7 +29,7 @@ buildPythonPackage rec {
owner = "open-mmlab";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-Ook85XWosxbvshsQxZEoAWI/Ugl2uSO8zoNJ5EuuW1E=";
hash = "sha256-eridbYHagwAyXX3/JggfvC0vuy6nBAIISRy1ARrQ7Kk=";
};
# tests are disabled due to sandbox env.

View File

@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "pysigma-backend-elasticsearch";
version = "1.0.3";
version = "1.0.4";
format = "pyproject";
disabled = pythonOlder "3.8";
@ -19,7 +19,7 @@ buildPythonPackage rec {
owner = "SigmaHQ";
repo = "pySigma-backend-elasticsearch";
rev = "refs/tags/v${version}";
hash = "sha256-NjMfJgM8YaJiQp8rucR099y4ZFG98XnxK1KZlnZb+MI=";
hash = "sha256-HHg5WNnWm7/4yhKRNMxskZzOgyH5qTjRxh55g8nkCb8=";
};
postPatch = ''

View File

@ -7,16 +7,16 @@
rustPlatform.buildRustPackage rec {
pname = "bacon";
version = "2.9.0";
version = "2.10.0";
src = fetchFromGitHub {
owner = "Canop";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-YUDvsgY5bLZwTCvBejqeRScgH6wu68ym3VxkSUmeqwI=";
hash = "sha256-7eRLv1ZrD3eVGoR0lmtefpW7NlokF+4vuleiT8BzCc8=";
};
cargoHash = "sha256-blcXhWaIWIA4BhmMX/T1mDDr1tUvxiauq7tXKBeZGbY=";
cargoHash = "sha256-jETjBGIwNh2Jt6aNNrOF+JOwGHKWIpMEacPp6zjbIhU=";
buildInputs = lib.optionals stdenv.isDarwin [
CoreServices

View File

@ -2,14 +2,14 @@
rustPlatform.buildRustPackage rec {
pname = "dprint";
version = "0.36.1";
version = "0.37.1";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-9mHWQPe0HW1gSK0qbw/rBvh0t60ZEycrYywNGsPSrZE=";
sha256 = "sha256-iDLydTwMJHalqtPLdSirr11AoVsdR+0er0kfB2+C1MA=";
};
cargoHash = "sha256-6v4DO0w+9SnAC+jIDgh8G5GstEG1F7vAgaG9XgPcyiU=";
cargoHash = "sha256-z1DYbxeif4UJXRwEnEWfgALHR/iyVfQ2vD8AWEsC/2U=";
buildInputs = lib.optionals stdenv.isDarwin [ Security ];

View File

@ -6,16 +6,16 @@
rustPlatform.buildRustPackage rec {
pname = "ast-grep";
version = "0.5.2";
version = "0.6.6";
src = fetchFromGitHub {
owner = "ast-grep";
repo = "ast-grep";
rev = "v${version}";
hash = "sha256-4bslw+BADUQO9cUCEYZ1U4eRdr/2652Shty+NVY0ZYI=";
rev = version;
hash = "sha256-iU7UtyF5isyc4G3vYu7f1bU7U38HsgkzNF+LctE08ds=";
};
cargoHash = "sha256-ed6hc7MIo/Hu1JY7yy6dYHbaTZ9S+T0dh/2H3sTT52Y=";
cargoHash = "sha256-30cYsRj10uFUlxhr7kgOy3I0m9qtq6kVNednX7OSQUk=";
# error: linker `aarch64-linux-gnu-gcc` not found
postPatch = ''
@ -34,6 +34,6 @@ rustPlatform.buildRustPackage rec {
homepage = "https://ast-grep.github.io/";
changelog = "https://github.com/ast-grep/ast-grep/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ montchr ];
maintainers = with maintainers; [ montchr lord-valen ];
};
}

View File

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "typos";
version = "1.15.8";
version = "1.15.9";
src = fetchFromGitHub {
owner = "crate-ci";
repo = pname;
rev = "v${version}";
hash = "sha256-yF3uvh7iM5Pqjp1VbgHAcVL4RC/GWlqc8Hc957RhAYw=";
hash = "sha256-vQYNWjJlxh2hIoJbSggfLvngQxEK85u0W9/6sRI3YPw=";
};
cargoHash = "sha256-WT2pEcEst6KfHLg/9xeAA/oViDMGwzRsux1FvEHddyk=";
cargoHash = "sha256-JRgVKc1W+J9hlY22PAw7cAyPrwSS/Xla6/R193S39k0=";
meta = with lib; {
description = "Source code spell checker";

View File

@ -10,15 +10,15 @@ let
in
stdenv.mkDerivation rec {
pname = "urbit";
version = "2.9";
version = "2.10";
src = fetchzip {
url = "https://github.com/urbit/vere/releases/download/vere-v${version}/${platform}.tgz";
sha256 = {
x86_64-linux = "sha256-CX3KoB5NNZBfikARh0ikeKQocaGIhbWcZsTFWOFk5oI=";
aarch64-linux = "sha256-PHVh4ktUe2HIPyudiwEUNuAfwOu4yCI9lxgbjrIllSU=";
x86_64-darwin = "sha256-lACh1UYtGrZUw+dtR0Ye6zqdtgp7llV9EkUoGOi+V4c=";
aarch64-darwin = "sha256-IRVMIriFVEsv69yUCxsiUaEgIlc618tf9dHiz76D+ug=";
x86_64-linux = "sha256-Bf0XDuGSBq8z9zouPQJyi/ZPEE6RzXb9+HCls89MR8Q=";
aarch64-linux = "sha256-Ecmc41X4AM3xigBvJGyWkIFxXM3vy+uK9p2M93UUJiY=";
x86_64-darwin = "sha256-eQSbzcP612LxOxdj9THPzyLtJwAthygjsSSct7vk1fc=";
aarch64-darwin = "sha256-VIXD8WHwAgRCLDZg1H5KmuiIqQMziWR6/4XxvSYtmTs=";
}.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
};

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, substituteAll, fetchpatch, pkg-config, gnused, autoreconfHook
{ lib, stdenv, fetchFromGitHub, substituteAll, pkg-config, gnused, autoreconfHook
, gtk-doc, acl, systemd, glib, libatasmart, polkit, coreutils, bash, which
, expat, libxslt, docbook_xsl, util-linux, mdadm, libgudev, libblockdev, parted
, gobject-introspection, docbook_xml_dtd_412, docbook_xml_dtd_43
@ -8,13 +8,13 @@
stdenv.mkDerivation rec {
pname = "udisks";
version = "2.9.4";
version = "2.10.0";
src = fetchFromGitHub {
owner = "storaged-project";
repo = "udisks";
rev = "${pname}-${version}";
sha256 = "sha256-MYQztzIyp5kh9t1bCIlj08/gaOmZfuu/ZOwo3F+rZiw=";
sha256 = "sha256-M0L2MjVKv7VmtML/JZx0I8vNj+m6KDWGezvcwFqoTNI=";
};
outputs = [ "out" "man" "dev" ] ++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "devdoc";
@ -23,7 +23,6 @@ stdenv.mkDerivation rec {
(substituteAll {
src = ./fix-paths.patch;
bash = "${bash}/bin/bash";
blkid = "${util-linux}/bin/blkid";
false = "${coreutils}/bin/false";
mdadm = "${mdadm}/bin/mdadm";
mkswap = "${util-linux}/bin/mkswap";
@ -40,11 +39,6 @@ stdenv.mkDerivation rec {
xfsprogs ntfs3g parted util-linux
];
})
# Fix crash on exit, remove on upgrade to 2.10.
(fetchpatch {
url = "https://github.com/storaged-project/udisks/commit/6464e3083c27b9e4d97848b9e69e862f265511d5.patch";
hash = "sha256-XGprXjJLIL8l4P5MRTHV8GOQR1hpaaFiLgexGnO9Lvg=";
})
];
strictDeps = true;

View File

@ -8,101 +8,12 @@ index ca802cce..bfd1c29e 100644
#
-SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="raid", ENV{ID_FS_TYPE}=="linux_raid_member", ENV{UDISKS_MD_MEMBER_LEVEL}=="", IMPORT{program}="/bin/sh -c '/sbin/mdadm --examine --export $tempnode | /bin/sed s/^MD_/UDISKS_MD_MEMBER_/g'"
+SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="raid", ENV{ID_FS_TYPE}=="linux_raid_member", ENV{UDISKS_MD_MEMBER_LEVEL}=="", IMPORT{program}="@sh@ -c '@mdadm@ --examine --export $tempnode | @sed@ s/^MD_/UDISKS_MD_MEMBER_/g'"
-SUBSYSTEM=="block", KERNEL=="md*", ENV{DEVTYPE}!="partition", IMPORT{program}="/bin/sh -c '/sbin/mdadm --detail --export $tempnode | /bin/sed s/^MD_/UDISKS_MD_/g'"
+SUBSYSTEM=="block", KERNEL=="md*", ENV{DEVTYPE}!="partition", IMPORT{program}="@sh@ -c '@mdadm@ --detail --export $tempnode | @sed@ s/^MD_/UDISKS_MD_/g'"
LABEL="udisks_probe_end"
diff --git a/modules/zram/data/udisks2-zram-setup@.service.in b/modules/zram/data/udisks2-zram-setup@.service.in
index ac868e84..03fdd887 100644
--- a/modules/zram/data/udisks2-zram-setup@.service.in
+++ b/modules/zram/data/udisks2-zram-setup@.service.in
@@ -8,7 +8,7 @@ Requires=dev-%i.device
Type=oneshot
RemainAfterExit=no
EnvironmentFile=-@zramconfdir@/%i
-ExecStart=-/bin/sh -c 'if [ -n "$ZRAM_NUM_STR" ]; then echo "$ZRAM_NUM_STR" > /sys/class/block/%i/max_comp_streams; fi'
-ExecStart=-/bin/sh -c 'if [ -n "$ZRAM_DEV_SIZE" ]; then echo "$ZRAM_DEV_SIZE" > /sys/class/block/%i/disksize; fi'
-ExecStart=-/bin/sh -c 'if [ "$SWAP" = "y" ]; then mkswap /dev/%i && swapon /dev/%i; fi'
-# ExecStop=-/bin/sh -c 'echo 1 > /sys/class/block/%i/reset'
+ExecStart=-@sh@ -c 'if [ -n "$ZRAM_NUM_STR" ]; then echo "$ZRAM_NUM_STR" > /sys/class/block/%i/max_comp_streams; fi'
+ExecStart=-@sh@ -c 'if [ -n "$ZRAM_DEV_SIZE" ]; then echo "$ZRAM_DEV_SIZE" > /sys/class/block/%i/disksize; fi'
+ExecStart=-@sh@ -c 'if [ "$SWAP" = "y" ]; then @mkswap@ /dev/%i && @swapon@ /dev/%i; fi'
+# ExecStop=-@sh@ -c 'echo 1 > /sys/class/block/%i/reset'
diff --git a/modules/zram/udiskslinuxmanagerzram.c b/modules/zram/udiskslinuxmanagerzram.c
index f647f653..df81e910 100644
--- a/modules/zram/udiskslinuxmanagerzram.c
+++ b/modules/zram/udiskslinuxmanagerzram.c
@@ -243,7 +243,7 @@ create_conf_files (guint64 num_devices,
g_snprintf (tmp, 255, "zram%" G_GUINT64_FORMAT, i);
filename = g_build_filename (PACKAGE_ZRAMCONF_DIR, tmp, NULL);
- contents = g_strdup_printf ("#!/bin/bash\n"
+ contents = g_strdup_printf ("#!@bash@\n"
"# UDisks2 managed ZRAM configuration\n\n"
"ZRAM_NUM_STR=%" G_GUINT64_FORMAT "\n"
"ZRAM_DEV_SIZE=%" G_GUINT64_FORMAT "\n"
diff --git a/src/tests/install-udisks/runtest.sh b/src/tests/install-udisks/runtest.sh
index e7df4ed2..ab4356d9 100644
--- a/src/tests/install-udisks/runtest.sh
+++ b/src/tests/install-udisks/runtest.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@bash@
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
diff --git a/src/tests/integration-test b/src/tests/integration-test
index 07e4e029..3bd8ec51 100755
--- a/src/tests/integration-test
+++ b/src/tests/integration-test
@@ -299,7 +299,7 @@ class UDisksTestCase(unittest.TestCase):
if not device:
device = cls.devname(partition)
result = {}
- cmd = subprocess.Popen(['blkid', '-p', '-o', 'udev', device], stdout=subprocess.PIPE)
+ cmd = subprocess.Popen(['@blkid@', '-p', '-o', 'udev', device], stdout=subprocess.PIPE)
for l in cmd.stdout:
(key, value) = l.decode('UTF-8').split('=', 1)
result[key] = value.strip()
@@ -437,7 +437,7 @@ class UDisksTestCase(unittest.TestCase):
f.write('KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", '
'ATTRS{model}=="scsi_debug*", '
'ENV{ID_CDROM_MEDIA}=="?*", '
- 'IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"\n')
+ 'IMPORT{program}="@blkid@ -o udev -p -u noraid $tempnode"\n')
# reload udev
subprocess.call('sync; pkill --signal HUP udevd || '
'pkill --signal HUP systemd-udevd',
@@ -1142,7 +1142,7 @@ class FS(UDisksTestCase):
self.assertFalse(os.access(f, os.X_OK))
f = os.path.join(mount_point, 'simple.exe')
- shutil.copy('/bin/bash', f)
+ shutil.copy('@bash@', f)
self.assertTrue(os.access(f, os.R_OK))
self.assertTrue(os.access(f, os.W_OK))
self.assertTrue(os.access(f, os.X_OK))
@@ -1155,7 +1155,7 @@ class FS(UDisksTestCase):
self.assertFalse(os.access(f, os.X_OK))
f = os.path.join(mount_point, 'subdir', 'subdir.exe')
- shutil.copy('/bin/bash', f)
+ shutil.copy('@bash@', f)
self.assertTrue(os.access(f, os.R_OK))
self.assertTrue(os.access(f, os.W_OK))
self.assertTrue(os.access(f, os.X_OK))
diff --git a/src/tests/storadectl/runtest.sh b/src/tests/storadectl/runtest.sh
index f03885f9..baca6a93 100644
--- a/src/tests/storadectl/runtest.sh
+++ b/src/tests/storadectl/runtest.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@bash@
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
diff --git a/src/tests/test.c b/src/tests/test.c
index 3ddbdf2c..a87f960a 100644
--- a/src/tests/test.c
@ -110,7 +21,7 @@ index 3ddbdf2c..a87f960a 100644
@@ -71,7 +71,7 @@ test_spawned_job_successful (void)
{
UDisksSpawnedJob *job;
- job = udisks_spawned_job_new ("/bin/true", NULL, getuid (), geteuid (), NULL, NULL);
+ job = udisks_spawned_job_new ("@true@", NULL, getuid (), geteuid (), NULL, NULL);
udisks_spawned_job_start (job);
@ -119,7 +30,7 @@ index 3ddbdf2c..a87f960a 100644
@@ -84,10 +84,10 @@ test_spawned_job_failure (void)
{
UDisksSpawnedJob *job;
- job = udisks_spawned_job_new ("/bin/false", NULL, getuid (), geteuid (), NULL, NULL);
+ job = udisks_spawned_job_new ("@false@", NULL, getuid (), geteuid (), NULL, NULL);
udisks_spawned_job_start (job);
@ -128,9 +39,9 @@ index 3ddbdf2c..a87f960a 100644
+ (gpointer) "Command-line `@false@' exited with non-zero exit status 1: ");
g_object_unref (job);
}
@@ -119,7 +119,7 @@ test_spawned_job_cancelled_at_start (void)
cancellable = g_cancellable_new ();
g_cancellable_cancel (cancellable);
- job = udisks_spawned_job_new ("/bin/true", NULL, getuid (), geteuid (), NULL, cancellable);
@ -140,7 +51,7 @@ index 3ddbdf2c..a87f960a 100644
(gpointer) "Operation was cancelled (g-io-error-quark, 19)");
@@ -144,7 +144,7 @@ test_spawned_job_cancelled_midway (void)
GCancellable *cancellable;
cancellable = g_cancellable_new ();
- job = udisks_spawned_job_new ("/bin/sleep 0.5", NULL, getuid (), geteuid (), NULL, cancellable);
+ job = udisks_spawned_job_new ("@sleep@ 0.5", NULL, getuid (), geteuid (), NULL, cancellable);
@ -150,7 +61,7 @@ index 3ddbdf2c..a87f960a 100644
@@ -197,7 +197,7 @@ test_spawned_job_premature_termination (void)
{
UDisksSpawnedJob *job;
- job = udisks_spawned_job_new ("/bin/sleep 1000", NULL, getuid (), geteuid (), NULL, NULL /* GCancellable */);
+ job = udisks_spawned_job_new ("@sleep@ 1000", NULL, getuid (), geteuid (), NULL, NULL /* GCancellable */);
udisks_spawned_job_start (job);

View File

@ -20,7 +20,7 @@ let
};
in python.pkgs.buildPythonApplication rec {
pname = "spotdl";
version = "4.1.10";
version = "4.1.11";
format = "pyproject";
@ -28,7 +28,7 @@ in python.pkgs.buildPythonApplication rec {
owner = "spotDL";
repo = "spotify-downloader";
rev = "refs/tags/v${version}";
hash = "sha256-SmyUoMOlBJZTJH19NwTKbz/vo7Oh4tGHCQrW5DVZQWQ=";
hash = "sha256-I/53JapzTo6VXss82/F0qO/Etwd4i6ZP9FPjaFRHwV0=";
};
nativeBuildInputs = with python.pkgs; [
@ -85,8 +85,8 @@ in python.pkgs.buildPythonApplication rec {
"test_album_from_string"
"test_album_from_url"
"test_album_length"
"test_artist_from_url"
"test_artist_from_string"
"test_artist_from_url"
"test_convert"
"test_download_ffmpeg"
"test_download_song"
@ -96,6 +96,7 @@ in python.pkgs.buildPythonApplication rec {
"test_preload_song"
"test_song_from_search_term"
"test_song_from_url"
"test_yt_search"
];
makeWrapperArgs = [

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "bluetuith";
version = "0.1.3";
version = "0.1.5";
src = fetchFromGitHub {
owner = "darkhz";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Xcj+1zSAgizj5e1VY77ma8i9XEuDaebyNZJcFCsNYwI=";
sha256 = "sha256-ii81XrIOhJNQtQWeLSqWCE4xhJOcXTzgnXm2Z20HvHo=";
};
vendorSha256 = "sha256-vPVfI2MXrUEvx/jlt6A3EEHiyiy4R3FSw3UnF76ZZho=";
vendorHash = "sha256-eSgjIZmD5HL8S1XY0LK2IeWDchjFWBlRq5qriBg7l2U=";
ldflags = [ "-s" "-w" ];

View File

@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
pname = "gifsicle";
version = "1.93";
version = "1.94";
src = fetchurl {
url = "https://www.lcdf.org/gifsicle/${pname}-${version}.tar.gz";
sha256 = "sha256-kvZweXMr9MHaCH5q4JBSBYRuWsd3ulyqZtEqc6qUNEc=";
sha256 = "sha256-S8lwBcB4liDedfiZl9PC9wdYxyxhqgou8E96Zxov+Js=";
};
buildInputs = lib.optionals gifview [ xorgproto libXt libX11 ];

View File

@ -1,4 +1,8 @@
{ lib, stdenv
, addOpenGLRunpath
, config
, cudaPackages ? {}
, cudaSupport ? config.cudaSupport or false
, fetchurl
, makeWrapper
, opencl-headers
@ -15,7 +19,12 @@ stdenv.mkDerivation rec {
sha256 = "sha256-sl4Qd7zzSQjMjxjBppouyYsEeyy88PURRNzzuh4Leyo=";
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
makeWrapper
] ++ lib.optionals cudaSupport [
addOpenGLRunpath
];
buildInputs = [ opencl-headers xxHash ];
makeFlags = [
@ -34,8 +43,20 @@ stdenv.mkDerivation rec {
done
'';
postFixup = ''
wrapProgram $out/bin/hashcat --prefix LD_LIBRARY_PATH : ${ocl-icd}/lib
postFixup = let
LD_LIBRARY_PATH = builtins.concatStringsSep ":" ([
"${ocl-icd}/lib"
] ++ lib.optionals cudaSupport [
"${cudaPackages.cudatoolkit}/lib"
]);
in ''
wrapProgram $out/bin/hashcat \
--prefix LD_LIBRARY_PATH : ${lib.escapeShellArg LD_LIBRARY_PATH}
'' + lib.optionalString cudaSupport ''
for program in $out/bin/hashcat $out/bin/.hashcat-wrapped; do
isELF "$program" || continue
addOpenGLRunpath "$program"
done
'';
meta = with lib; {

View File

@ -8,16 +8,16 @@
buildGoModule rec {
pname = "kubeclarity";
version = "2.18.1";
version = "2.19.0";
src = fetchFromGitHub {
owner = "openclarity";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-hSVxhXaRSIKw1/14BS+mzDkdds6LurWTNNwHpKIXZxM=";
hash = "sha256-ua9BmQh5NacxmcgiwnaJ8avjuR6ZrG3ilx11dF+tDWs=";
};
vendorHash = "sha256-vAR/RqPL4PWvCC3QevaLFtA9JEIy/DuCIrIN5Ilb3Ko=";
vendorHash = "sha256-XXjKkq5bFf8iFhBLJ3xYHuNWctP3Qo5Gqo/gfZQF/n8=";
nativeBuildInputs = [
pkg-config

View File

@ -7,16 +7,16 @@
buildGoModule rec {
pname = "gtree";
version = "1.8.2";
version = "1.8.3";
src = fetchFromGitHub {
owner = "ddddddO";
repo = "gtree";
rev = "v${version}";
hash = "sha256-c+DAFnHcQq1zMWFXnB0Bp1/HCeCBaUGCAd/XAClB0Lk=";
hash = "sha256-7ABfmSKHdCDR1vLsyQd5bysHk0lNsjgpDINibSpVyOc=";
};
vendorHash = "sha256-mzMoXgO60Skqh1fwN647GFctzuM6CCaYEoPIwLjYol4=";
vendorHash = "sha256-BMfJFR4sqJNNlJ7Y3q2GlXWjMDH+DXhuFQVX5I9Czkc=";
subPackages = [
"cmd/gtree"

View File

@ -80,8 +80,7 @@ in {
package-list = callPackage ../development/haskell-modules/package-list.nix {};
compiler = rec {
compiler = {
ghc865Binary = callPackage ../development/compilers/ghc/8.6.5-binary.nix {
llvmPackages = pkgs.llvmPackages_6;
};
@ -127,7 +126,7 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_7;
llvmPackages = pkgs.llvmPackages_7;
};
ghc88 = ghc884;
ghc88 = compiler.ghc884;
ghc8107 = callPackage ../development/compilers/ghc/8.10.7.nix {
bootPkgs =
# aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
@ -148,7 +147,7 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc810 = ghc8107;
ghc810 = compiler.ghc8107;
ghc902 = callPackage ../development/compilers/ghc/9.0.2.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
@ -164,7 +163,7 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc90 = ghc902;
ghc90 = compiler.ghc902;
ghc924 = callPackage ../development/compilers/ghc/9.2.4.nix {
bootPkgs =
# aarch64 ghc8107Binary exceeds max output size on hydra
@ -250,7 +249,7 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc92 = ghc928;
ghc92 = compiler.ghc928;
ghc942 = callPackage ../development/compilers/ghc/9.4.2.nix {
bootPkgs =
# Building with 9.2 is broken due to
@ -347,7 +346,7 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc94 = ghc945;
ghc94 = compiler.ghc945;
ghc962 = callPackage ../development/compilers/ghc/9.6.2.nix {
bootPkgs =
# For GHC 9.2 no armv7l bindists are available.
@ -368,7 +367,7 @@ in {
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
llvmPackages = pkgs.llvmPackages_15;
};
ghc96 = ghc962;
ghc96 = compiler.ghc962;
ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
bootPkgs =
# For GHC 9.2 no armv7l bindists are available.
@ -422,7 +421,7 @@ in {
packageOverrides = self : super : {};
# Always get compilers from `buildPackages`
packages = let bh = buildPackages.haskell; in rec {
packages = let bh = buildPackages.haskell; in {
ghc865Binary = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc865Binary;
@ -471,19 +470,19 @@ in {
ghc = bh.compiler.ghc884;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.8.x.nix { };
};
ghc88 = ghc884;
ghc88 = packages.ghc884;
ghc8107 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc8107;
ghc = bh.compiler.ghc8107;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
};
ghc810 = ghc8107;
ghc810 = packages.ghc8107;
ghc902 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc902;
ghc = bh.compiler.ghc902;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.0.x.nix { };
};
ghc90 = ghc902;
ghc90 = packages.ghc902;
ghc924 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc924;
ghc = bh.compiler.ghc924;
@ -509,7 +508,7 @@ in {
ghc = bh.compiler.ghc928;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
ghc92 = ghc928;
ghc92 = packages.ghc928;
ghc942 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc942;
ghc = bh.compiler.ghc942;
@ -530,13 +529,13 @@ in {
ghc = bh.compiler.ghc945;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
};
ghc94 = ghc945;
ghc94 = packages.ghc945;
ghc962 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc962;
ghc = bh.compiler.ghc962;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { };
};
ghc96 = ghc962;
ghc96 = packages.ghc962;
ghcHEAD = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghcHEAD;
ghc = bh.compiler.ghcHEAD;