mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge master into staging-next
This commit is contained in:
commit
acbec64db0
@ -11318,6 +11318,12 @@
|
||||
name = "Maxim Schuwalow";
|
||||
email = "maxim.schuwalow@gmail.com";
|
||||
};
|
||||
mschwaig = {
|
||||
name = "Martin Schwaighofer";
|
||||
github = "mschwaig";
|
||||
githubId = 3856390;
|
||||
email = "mschwaig+nixpkgs@eml.cc";
|
||||
};
|
||||
msfjarvis = {
|
||||
github = "msfjarvis";
|
||||
githubId = 13348378;
|
||||
|
@ -9,6 +9,7 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkDefault
|
||||
mkIf
|
||||
mkOption
|
||||
stringAfter
|
||||
@ -21,13 +22,42 @@ in
|
||||
{
|
||||
options = {
|
||||
nix = {
|
||||
channel = {
|
||||
enable = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Whether the `nix-channel` command and state files are made available on the machine.
|
||||
|
||||
The following files are initialized when enabled:
|
||||
- `/nix/var/nix/profiles/per-user/root/channels`
|
||||
- `/root/.nix-channels`
|
||||
- `$HOME/.nix-defexpr/channels` (on login)
|
||||
|
||||
Disabling this option will not remove the state files from the system.
|
||||
'';
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
nixPath = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [
|
||||
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
||||
"nixos-config=/etc/nixos/configuration.nix"
|
||||
"/nix/var/nix/profiles/per-user/root/channels"
|
||||
];
|
||||
default =
|
||||
if cfg.channel.enable
|
||||
then [
|
||||
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
||||
"nixos-config=/etc/nixos/configuration.nix"
|
||||
"/nix/var/nix/profiles/per-user/root/channels"
|
||||
]
|
||||
else [];
|
||||
defaultText = ''
|
||||
if nix.channel.enable
|
||||
then [
|
||||
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
||||
"nixos-config=/etc/nixos/configuration.nix"
|
||||
"/nix/var/nix/profiles/per-user/root/channels"
|
||||
]
|
||||
else [];
|
||||
'';
|
||||
description = lib.mdDoc ''
|
||||
The default Nix expression search path, used by the Nix
|
||||
evaluator to look up paths enclosed in angle brackets
|
||||
@ -49,22 +79,30 @@ in
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.extraInit =
|
||||
''
|
||||
mkIf cfg.channel.enable ''
|
||||
if [ -e "$HOME/.nix-defexpr/channels" ]; then
|
||||
export NIX_PATH="$HOME/.nix-defexpr/channels''${NIX_PATH:+:$NIX_PATH}"
|
||||
fi
|
||||
'';
|
||||
|
||||
environment.extraSetup = mkIf (!cfg.channel.enable) ''
|
||||
rm $out/bin/nix-channel
|
||||
'';
|
||||
|
||||
# NIX_PATH has a non-empty default according to Nix docs, so we don't unset
|
||||
# it when empty.
|
||||
environment.sessionVariables = {
|
||||
NIX_PATH = cfg.nixPath;
|
||||
};
|
||||
|
||||
system.activationScripts.nix-channel = stringAfter [ "etc" "users" ]
|
||||
''
|
||||
nix.settings.nix-path = mkIf (! cfg.channel.enable) (mkDefault "");
|
||||
|
||||
system.activationScripts.nix-channel = mkIf cfg.channel.enable
|
||||
(stringAfter [ "etc" "users" ] ''
|
||||
# Subscribe the root user to the NixOS channel by default.
|
||||
if [ ! -e "/root/.nix-channels" ]; then
|
||||
echo "${config.system.defaultChannel} nixos" > "/root/.nix-channels"
|
||||
fi
|
||||
'';
|
||||
'');
|
||||
};
|
||||
}
|
||||
|
@ -233,7 +233,6 @@ in
|
||||
nixpkgs.config.firefox = {
|
||||
enableBrowserpass = nmh.browserpass;
|
||||
enableBukubrow = nmh.bukubrow;
|
||||
enableEUWebID = nmh.euwebid;
|
||||
enableTridactylNative = nmh.tridactyl;
|
||||
enableUgetIntegrator = nmh.ugetIntegrator;
|
||||
enableFXCastBridge = nmh.fxCast;
|
||||
|
@ -11,16 +11,20 @@ let
|
||||
|
||||
# The configuration to install.
|
||||
makeConfig = { bootLoader, grubDevice, grubIdentifier, grubUseEfi
|
||||
, extraConfig, forceGrubReinstallCount ? 0
|
||||
, extraConfig, forceGrubReinstallCount ? 0, flake ? false
|
||||
}:
|
||||
pkgs.writeText "configuration.nix" ''
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{ imports =
|
||||
[ ./hardware-configuration.nix
|
||||
<nixpkgs/nixos/modules/testing/test-instrumentation.nix>
|
||||
${if flake
|
||||
then "" # Still included, but via installer/flake.nix
|
||||
else "<nixpkgs/nixos/modules/testing/test-instrumentation.nix>"}
|
||||
];
|
||||
|
||||
networking.hostName = "thatworked";
|
||||
|
||||
documentation.enable = false;
|
||||
|
||||
# To ensure that we can rebuild the grub configuration on the nixos-rebuild
|
||||
@ -67,7 +71,7 @@ let
|
||||
# partitions and filesystems.
|
||||
testScriptFun = { bootLoader, createPartitions, grubDevice, grubUseEfi
|
||||
, grubIdentifier, preBootCommands, postBootCommands, extraConfig
|
||||
, testSpecialisationConfig
|
||||
, testSpecialisationConfig, testFlakeSwitch
|
||||
}:
|
||||
let iface = "virtio";
|
||||
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
|
||||
@ -86,9 +90,14 @@ let
|
||||
|
||||
qemu_flags = {"qemuFlags": assemble_qemu_flags()}
|
||||
|
||||
import os
|
||||
|
||||
image_dir = machine.state_dir
|
||||
disk_image = os.path.join(image_dir, "machine.qcow2")
|
||||
|
||||
hd_flags = {
|
||||
"hdaInterface": "${iface}",
|
||||
"hda": "vm-state-machine/machine.qcow2",
|
||||
"hda": disk_image,
|
||||
}
|
||||
${optionalString isEfi ''
|
||||
hd_flags.update(
|
||||
@ -232,6 +241,11 @@ let
|
||||
machine = create_machine_named("boot-after-rebuild-switch")
|
||||
${preBootCommands}
|
||||
machine.wait_for_unit("network.target")
|
||||
|
||||
# Sanity check, is it the configuration.nix we generated?
|
||||
hostname = machine.succeed("hostname").strip()
|
||||
assert hostname == "thatworked"
|
||||
|
||||
${postBootCommands}
|
||||
machine.shutdown()
|
||||
|
||||
@ -270,6 +284,84 @@ let
|
||||
with subtest("We should find a file named /etc/gitconfig"):
|
||||
machine.succeed("test -e /etc/gitconfig")
|
||||
|
||||
${postBootCommands}
|
||||
machine.shutdown()
|
||||
''
|
||||
+ optionalString testFlakeSwitch ''
|
||||
${preBootCommands}
|
||||
machine.start()
|
||||
|
||||
with subtest("Configure system with flake"):
|
||||
# TODO: evaluate as user?
|
||||
machine.succeed("""
|
||||
mkdir /root/my-config
|
||||
mv /etc/nixos/hardware-configuration.nix /root/my-config/
|
||||
mv /etc/nixos/secret /root/my-config/
|
||||
rm /etc/nixos/configuration.nix
|
||||
""")
|
||||
machine.copy_from_host_via_shell(
|
||||
"${makeConfig {
|
||||
inherit bootLoader grubDevice grubIdentifier grubUseEfi extraConfig;
|
||||
forceGrubReinstallCount = 1;
|
||||
flake = true;
|
||||
}}",
|
||||
"/root/my-config/configuration.nix",
|
||||
)
|
||||
machine.copy_from_host_via_shell(
|
||||
"${./installer/flake.nix}",
|
||||
"/root/my-config/flake.nix",
|
||||
)
|
||||
machine.succeed("""
|
||||
# for some reason the image does not have `pkgs.path`, so
|
||||
# we use readlink to find a Nixpkgs source.
|
||||
pkgs=$(readlink -f /nix/var/nix/profiles/per-user/root/channels)/nixos
|
||||
if ! [[ -e $pkgs/pkgs/top-level/default.nix ]]; then
|
||||
echo 1>&2 "$pkgs does not seem to be a nixpkgs source. Please fix the test so that pkgs points to a nixpkgs source.";
|
||||
exit 1;
|
||||
fi
|
||||
sed -e s^@nixpkgs@^$pkgs^ -i /root/my-config/flake.nix
|
||||
""")
|
||||
|
||||
with subtest("Switch to flake based config"):
|
||||
machine.succeed("nixos-rebuild switch --flake /root/my-config#xyz")
|
||||
|
||||
${postBootCommands}
|
||||
machine.shutdown()
|
||||
|
||||
${preBootCommands}
|
||||
machine.start()
|
||||
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
with subtest("nix-channel command is not available anymore"):
|
||||
machine.succeed("! which nix-channel")
|
||||
|
||||
# Note that the channel profile is still present on disk, but configured
|
||||
# not to be used.
|
||||
with subtest("builtins.nixPath is now empty"):
|
||||
machine.succeed("""
|
||||
[[ "[ ]" == "$(nix-instantiate builtins.nixPath --eval --expr)" ]]
|
||||
""")
|
||||
|
||||
with subtest("<nixpkgs> does not resolve"):
|
||||
machine.succeed("""
|
||||
! nix-instantiate '<nixpkgs>' --eval --expr
|
||||
""")
|
||||
|
||||
with subtest("Evaluate flake config in fresh env without nix-channel"):
|
||||
machine.succeed("nixos-rebuild switch --flake /root/my-config#xyz")
|
||||
|
||||
with subtest("Evaluate flake config in fresh env without channel profiles"):
|
||||
machine.succeed("""
|
||||
(
|
||||
exec 1>&2
|
||||
rm -v /root/.nix-channels
|
||||
rm -vrf ~/.nix-defexpr
|
||||
rm -vrf /nix/var/nix/profiles/per-user/root/channels*
|
||||
)
|
||||
""")
|
||||
machine.succeed("nixos-rebuild switch --flake /root/my-config#xyz")
|
||||
|
||||
${postBootCommands}
|
||||
machine.shutdown()
|
||||
'';
|
||||
@ -282,6 +374,7 @@ let
|
||||
, grubDevice ? "/dev/vda", grubIdentifier ? "uuid", grubUseEfi ? false
|
||||
, enableOCR ? false, meta ? {}
|
||||
, testSpecialisationConfig ? false
|
||||
, testFlakeSwitch ? false
|
||||
}:
|
||||
makeTest {
|
||||
inherit enableOCR;
|
||||
@ -387,7 +480,7 @@ let
|
||||
testScript = testScriptFun {
|
||||
inherit bootLoader createPartitions preBootCommands postBootCommands
|
||||
grubDevice grubIdentifier grubUseEfi extraConfig
|
||||
testSpecialisationConfig;
|
||||
testSpecialisationConfig testFlakeSwitch;
|
||||
};
|
||||
};
|
||||
|
||||
@ -439,6 +532,10 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
simple-test-config-flake = simple-test-config // {
|
||||
testFlakeSwitch = true;
|
||||
};
|
||||
|
||||
simple-uefi-grub-config = {
|
||||
createPartitions = ''
|
||||
machine.succeed(
|
||||
@ -493,6 +590,8 @@ in {
|
||||
# one big filesystem partition.
|
||||
simple = makeInstallerTest "simple" simple-test-config;
|
||||
|
||||
switchToFlake = makeInstallerTest "switch-to-flake" simple-test-config-flake;
|
||||
|
||||
# Test cloned configurations with the simple grub configuration
|
||||
simpleSpecialised = makeInstallerTest "simpleSpecialised" (simple-test-config // specialisation-test-extraconfig);
|
||||
|
||||
|
20
nixos/tests/installer/flake.nix
Normal file
20
nixos/tests/installer/flake.nix
Normal file
@ -0,0 +1,20 @@
|
||||
# This file gets copied into the installation
|
||||
|
||||
{
|
||||
# To keep things simple, we'll use an absolute path dependency here.
|
||||
inputs.nixpkgs.url = "@nixpkgs@";
|
||||
|
||||
outputs = { nixpkgs, ... }: {
|
||||
|
||||
nixosConfigurations.xyz = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
./configuration.nix
|
||||
( nixpkgs + "/nixos/modules/testing/test-instrumentation.nix" )
|
||||
{
|
||||
# We don't need nix-channel anymore
|
||||
nix.channel.enable = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
{ stdenv, lib, fetchurl, undmg }:
|
||||
|
||||
let
|
||||
versionComponents = [ "4" "0" "1" ];
|
||||
appName = "MuseScore ${builtins.head versionComponents}";
|
||||
ref = "230121751";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "musescore-darwin";
|
||||
version = lib.concatStringsSep "." versionComponents;
|
||||
|
||||
# The disk image contains the .app and a symlink to /Applications.
|
||||
sourceRoot = "${appName}.app";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/musescore/MuseScore/releases/download/v${version}/MuseScore-${version}.${ref}.dmg";
|
||||
hash = "sha256-tkIEV+tCS0SYh2TlC70/zEBUEOSg//EaSKDGA7kH/vo=";
|
||||
};
|
||||
|
||||
buildInputs = [ undmg ];
|
||||
installPhase = ''
|
||||
mkdir -p "$out/Applications/${appName}.app"
|
||||
cp -R . "$out/Applications/${appName}.app"
|
||||
chmod a+x "$out/Applications/${appName}.app/Contents/MacOS/mscore"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Music notation and composition software";
|
||||
homepage = "https://musescore.org/";
|
||||
license = licenses.gpl3Only;
|
||||
platforms = platforms.darwin;
|
||||
maintainers = [];
|
||||
};
|
||||
}
|
@ -1,55 +1,143 @@
|
||||
{ mkDerivation, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, ninja
|
||||
, alsa-lib, freetype, libjack2, lame, libogg, libpulseaudio, libsndfile, libvorbis
|
||||
, portaudio, portmidi, qtbase, qtdeclarative, qtgraphicaleffects, flac
|
||||
, qtquickcontrols2, qtscript, qtsvg, qttools
|
||||
, qtwebengine, qtxmlpatterns, qtnetworkauth, qtx11extras
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, wrapQtAppsHook
|
||||
, pkg-config
|
||||
, ninja
|
||||
, alsa-lib
|
||||
, freetype
|
||||
, libjack2
|
||||
, lame
|
||||
, libogg
|
||||
, libpulseaudio
|
||||
, libsndfile
|
||||
, libvorbis
|
||||
, portaudio
|
||||
, portmidi
|
||||
, qtbase
|
||||
, qtdeclarative
|
||||
, qtgraphicaleffects
|
||||
, flac
|
||||
, qtquickcontrols
|
||||
, qtquickcontrols2
|
||||
, qtscript
|
||||
, qtsvg
|
||||
, qtxmlpatterns
|
||||
, qtnetworkauth
|
||||
, qtx11extras
|
||||
, nixosTests
|
||||
, darwin
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
let
|
||||
stdenv' = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
|
||||
# portaudio propagates Darwin frameworks. Rebuild it using the 11.0 stdenv
|
||||
# from Qt and the 11.0 SDK frameworks.
|
||||
portaudio' = if stdenv.isDarwin then portaudio.override {
|
||||
stdenv = stdenv';
|
||||
inherit (darwin.apple_sdk_11_0.frameworks)
|
||||
AudioUnit
|
||||
AudioToolbox
|
||||
CoreAudio
|
||||
CoreServices
|
||||
Carbon
|
||||
;
|
||||
} else portaudio;
|
||||
in stdenv'.mkDerivation rec {
|
||||
pname = "musescore";
|
||||
version = "4.0.2";
|
||||
version = "4.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "musescore";
|
||||
repo = "MuseScore";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-3NSHUdTyAC/WOhkB6yBrqtV3LV4Hl1m3poB3ojtJMfs=";
|
||||
sha256 = "sha256-CqW1f0VsF2lW79L3FY2ev+6FoHLbYOJ9LWHeBlWegeU=";
|
||||
};
|
||||
patches = [
|
||||
# See https://github.com/musescore/MuseScore/issues/15571
|
||||
# Upstream from some reason wants to install qml files from qtbase in
|
||||
# installPhase, this patch removes this behavior. See:
|
||||
# https://github.com/musescore/MuseScore/issues/18665
|
||||
(fetchpatch {
|
||||
url = "https://github.com/musescore/MuseScore/commit/365be5dfb7296ebee4677cb74b67c1721bc2cf7b.patch";
|
||||
hash = "sha256-tJ2M21i3geO9OsjUQKNatSXTkJ5U9qMT4RLNdJnyoKw=";
|
||||
url = "https://github.com/doronbehar/MuseScore/commit/f48448a3ede46f5a7ef470940072fbfb6742487c.patch";
|
||||
hash = "sha256-UEc7auscnW0KMfWkLKQtm+UstuTNsuFeoNJYIidIlwM=";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DMUSESCORE_BUILD_CONFIG=release"
|
||||
# Disable the _usage_ of the `/bin/crashpad_handler` utility. See:
|
||||
# https://github.com/musescore/MuseScore/pull/15577
|
||||
"-DBUILD_CRASHPAD_CLIENT=OFF"
|
||||
"-DMUSESCORE_BUILD_MODE=release"
|
||||
# Disable the build and usage of the `/bin/crashpad_handler` utility - it's
|
||||
# not useful on NixOS, see:
|
||||
# https://github.com/musescore/MuseScore/issues/15571
|
||||
"-DMUE_BUILD_CRASHPAD_CLIENT=OFF"
|
||||
# Use our freetype
|
||||
"-DUSE_SYSTEM_FREETYPE=ON"
|
||||
# From some reason, in $src/build/cmake/SetupBuildEnvironment.cmake,
|
||||
# upstream defaults to compiling to x86_64 only, unless this cmake flag is
|
||||
# set
|
||||
"-DMUE_COMPILE_BUILD_MACOS_APPLE_SILICON=ON"
|
||||
# Don't bundle qt qml files, relevant really only for darwin, but we set
|
||||
# this for all platforms anyway.
|
||||
"-DMUE_COMPILE_INSTALL_QTQML_FILES=OFF"
|
||||
];
|
||||
|
||||
qtWrapperArgs = [
|
||||
# MuseScore JACK backend loads libjack at runtime.
|
||||
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libjack2 ]}"
|
||||
"--prefix ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libjack2 ]}"
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
# There are some issues with using the wayland backend, see:
|
||||
# https://musescore.org/en/node/321936
|
||||
"--set-default QT_QPA_PLATFORM xcb"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ninja ];
|
||||
# HACK `propagatedSandboxProfile` does not appear to actually propagate the
|
||||
# sandbox profile from `qtbase`, see:
|
||||
# https://github.com/NixOS/nixpkgs/issues/237458
|
||||
sandboxProfile = toString qtbase.__propagatedSandboxProfile or null;
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapQtAppsHook
|
||||
cmake
|
||||
pkg-config
|
||||
ninja
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib libjack2 freetype lame libogg libpulseaudio libsndfile libvorbis
|
||||
portaudio portmidi flac # tesseract
|
||||
qtbase qtdeclarative qtgraphicaleffects qtquickcontrols2
|
||||
qtscript qtsvg qttools qtwebengine qtxmlpatterns qtnetworkauth qtx11extras
|
||||
libjack2
|
||||
freetype
|
||||
lame
|
||||
libogg
|
||||
libpulseaudio
|
||||
libsndfile
|
||||
libvorbis
|
||||
portaudio'
|
||||
portmidi
|
||||
flac
|
||||
qtbase
|
||||
qtdeclarative
|
||||
qtgraphicaleffects
|
||||
qtquickcontrols
|
||||
qtquickcontrols2
|
||||
qtscript
|
||||
qtsvg
|
||||
qtxmlpatterns
|
||||
qtnetworkauth
|
||||
qtx11extras
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
alsa-lib
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# Remove unneeded bundled libraries and headers
|
||||
rm -r $out/{include,lib}
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
mkdir -p "$out/Applications"
|
||||
mv "$out/mscore.app" "$out/Applications/mscore.app"
|
||||
mkdir -p $out/bin
|
||||
ln -s $out/Applications/mscore.app/Contents/MacOS/mscore $out/bin/mscore.
|
||||
'';
|
||||
|
||||
passthru.tests = nixosTests.musescore;
|
||||
|
||||
meta = with lib; {
|
||||
@ -57,9 +145,9 @@ mkDerivation rec {
|
||||
homepage = "https://musescore.org/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ vandenoever turion doronbehar ];
|
||||
# Darwin requires CoreMIDI from SDK 11.3, we use the upstream built .dmg
|
||||
# file in ./darwin.nix in the meantime.
|
||||
platforms = platforms.linux;
|
||||
# on aarch64-linux:
|
||||
# error: cannot convert '<brace-enclosed initializer list>' to 'float32x4_t' in assignment
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||
mainProgram = "mscore";
|
||||
};
|
||||
}
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "toot";
|
||||
version = "0.36.0";
|
||||
version = "0.37.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ihabunek";
|
||||
repo = "toot";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "sha256-gEQA9PASSKAMqulOaK8ynBXX7BdptY1uwdS1tOf3/Jc=";
|
||||
sha256 = "sha256-NmxBiFLjAW4kwuChbgR5VsAOpgE6sJOO/MmfRhotb40=";
|
||||
};
|
||||
|
||||
nativeCheckInputs = with python3Packages; [ pytest ];
|
||||
|
@ -5,7 +5,7 @@
|
||||
## various stuff that can be plugged in
|
||||
, ffmpeg_5, xorg, alsa-lib, libpulseaudio, libcanberra-gtk3, libglvnd, libnotify, opensc
|
||||
, gnome/*.gnome-shell*/
|
||||
, browserpass, gnome-browser-connector, uget-integrator, plasma5Packages, bukubrow, web-eid-app, pipewire
|
||||
, browserpass, gnome-browser-connector, uget-integrator, plasma5Packages, bukubrow, pipewire
|
||||
, tridactyl-native
|
||||
, fx_cast_bridge
|
||||
, udev
|
||||
@ -65,7 +65,6 @@ let
|
||||
[ ]
|
||||
++ lib.optional (cfg.enableBrowserpass or false) (lib.getBin browserpass)
|
||||
++ lib.optional (cfg.enableBukubrow or false) bukubrow
|
||||
++ lib.optional (cfg.enableEUWebID or false) web-eid-app
|
||||
++ lib.optional (cfg.enableTridactylNative or false) tridactyl-native
|
||||
++ lib.optional (cfg.enableGnomeExtensions or false) gnome-browser-connector
|
||||
++ lib.optional (cfg.enableUgetIntegrator or false) uget-integrator
|
||||
|
@ -7,13 +7,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "primecount";
|
||||
version = "7.8";
|
||||
version = "7.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kimwalisch";
|
||||
repo = "primecount";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-yKk+zXvA/MI7y9gCMwJNYHRYIYgeWyJHjyPi1uNWVnM=";
|
||||
hash = "sha256-0sn6WnrI6Umrsz3lvFIzFi8/fEAqh1qhWxtNPPq5SyA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -26,7 +26,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.14.0";
|
||||
version = "1.15.0";
|
||||
|
||||
# build stimuli file for PGO build and the script to generate it
|
||||
# independently of the foot's build, so we can cache the result
|
||||
@ -39,7 +39,7 @@ let
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://codeberg.org/dnkl/foot/raw/tag/${version}/scripts/generate-alt-random-writes.py";
|
||||
sha256 = "0w4d0rxi54p8lvbynypcywqqwbbzmyyzc0svjab27ngmdj1034ii";
|
||||
hash = "sha256-NvkKJ75n/OzgEd2WHX1NQIXPn9R0Z+YI1rpFmNxaDhk=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
@ -98,7 +98,7 @@ stdenv.mkDerivation rec {
|
||||
owner = "dnkl";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1187805pxygyl547w75i4cl37kaw8y8ng11r5qqldv6fm74k31mk";
|
||||
hash = "sha256-ji0e5E2yy0wYbzw38nuQRoRcd83FsJh6E5TabtUP1g8=";
|
||||
};
|
||||
|
||||
depsBuildBuild = [
|
||||
|
@ -4,19 +4,18 @@
|
||||
, parsec, process, regex-compat, text, time }:
|
||||
|
||||
let
|
||||
version = "2.4.0";
|
||||
version = "2.4.2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "koka-lang";
|
||||
repo = "koka";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-+evs5g0qrplUMr8zC51GvUx2JXQBYJb39IaI4rC6CSA=";
|
||||
sha256 = "sha256-sVjaIzOxNuBtDswpDl5gLB10Sw945TQAf2ywrKumqqk=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
kklib = stdenv.mkDerivation {
|
||||
pname = "kklib";
|
||||
inherit version;
|
||||
src = "${src}/kklib";
|
||||
patches = [ ./kklib-mimalloc-macos-fix.diff ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
outputs = [ "out" "dev" ];
|
||||
postInstall = ''
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- kklib/mimalloc/src/random.c 1969-12-31 18:00:01.000000000 -0600
|
||||
+++ kklib/mimalloc/src/random.c.new 2022-01-16 19:43:54.000000000 -0600
|
||||
@@ -195,6 +195,7 @@
|
||||
#elif defined(__APPLE__)
|
||||
#include <AvailabilityMacros.h>
|
||||
#if defined(MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10
|
||||
+#include <CommonCrypto/CommonCryptoError.h>
|
||||
#include <CommonCrypto/CommonRandom.h>
|
||||
#endif
|
||||
static bool os_random_buf(void* buf, size_t buf_len) {
|
@ -26,13 +26,13 @@ assert (blas.isILP64 == lapack.isILP64 &&
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "igraph";
|
||||
version = "0.10.4";
|
||||
version = "0.10.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "igraph";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-LsTOxUktGZcp46Ec9QH3+9C+VADMYTZZCjKF1gp36xk=";
|
||||
hash = "sha256-HNc+xU7Gcv9BSpb2OgyG9tCbk/dfWw5Ix1c2gvFZklE=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -13,6 +13,7 @@
|
||||
, libsamplerate
|
||||
, libvorbis
|
||||
, libxml2
|
||||
, makeWrapper
|
||||
, movit
|
||||
, opencv4
|
||||
, rtaudio
|
||||
@ -52,6 +53,7 @@ stdenv.mkDerivation rec {
|
||||
cmake
|
||||
pkg-config
|
||||
which
|
||||
makeWrapper
|
||||
] ++ lib.optionals cudaSupport [
|
||||
cudaPackages.cuda_nvcc
|
||||
] ++ lib.optionals enablePython [
|
||||
@ -102,11 +104,13 @@ stdenv.mkDerivation rec {
|
||||
"-DSWIG_PYTHON=ON"
|
||||
];
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1"
|
||||
] ++ lib.optionals enableJackrack [
|
||||
"--prefix LADSPA_PATH : ${ladspaPlugins}/lib/ladspa"
|
||||
];
|
||||
preFixup = ''
|
||||
wrapProgram $out/bin/melt \
|
||||
--prefix FREI0R_PATH : ${frei0r}/lib/frei0r-1 \
|
||||
${lib.optionalString enableJackrack "--prefix LADSPA_PATH : ${ladspaPlugins}/lib/ladspa"} \
|
||||
${lib.optionalString enableQt "\${qtWrapperArgs[@]}"}
|
||||
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace "$dev"/lib/pkgconfig/mlt-framework-7.pc \
|
||||
|
@ -1,203 +1,104 @@
|
||||
{ stdenv
|
||||
, bash
|
||||
, abseil-cpp
|
||||
, buildPackages
|
||||
, buildBazelPackage
|
||||
, fetchFromGitHub
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, fetchurl
|
||||
, flatbuffers
|
||||
, lib
|
||||
, zlib
|
||||
}:
|
||||
let
|
||||
tflite-eigen = fetchFromGitLab {
|
||||
owner = "libeigen";
|
||||
repo = "eigen";
|
||||
rev = "3d9051ea84a5089b277c88dac456b3b1576bfa7f";
|
||||
sha256 = "1y3f2jvimb5i904f4n37h23cv2pkdlbz8656s0kga1y7c0p50wif";
|
||||
};
|
||||
|
||||
gemmlowp-src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "gemmlowp";
|
||||
rev = "fda83bdc38b118cc6b56753bd540caa49e570745";
|
||||
sha256 = "1sbp8kmr2azwlvfbzryy1frxi99jhsh1nc93bdbxdf8zdgpv0kxl";
|
||||
};
|
||||
|
||||
neon-2-sse-src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "ARM_NEON_2_x86_SSE";
|
||||
rev = "1200fe90bb174a6224a525ee60148671a786a71f";
|
||||
sha256 = "0fhxch711ck809dpq1myxz63jiiwfcnxvj45ww0kg8s0pqpn5kv6";
|
||||
};
|
||||
|
||||
farmhash-src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "farmhash";
|
||||
rev = "816a4ae622e964763ca0862d9dbd19324a1eaf45";
|
||||
sha256 = "1mqxsljq476n1hb8ilkrpb39yz3ip2hnc7rhzszz4sri8ma7qzp6";
|
||||
};
|
||||
|
||||
fft2d-src = fetchurl {
|
||||
url = "http://www.kurims.kyoto-u.ac.jp/~ooura/fft2d.tgz";
|
||||
sha256 = "ada7e99087c4ed477bfdf11413f2ba8db8a840ba9bbf8ac94f4f3972e2a7cec9";
|
||||
};
|
||||
|
||||
fp16-src = fetchFromGitHub {
|
||||
owner = "Maratyszcza";
|
||||
repo = "FP16";
|
||||
rev = "4dfe081cf6bcd15db339cf2680b9281b8451eeb3";
|
||||
sha256 = "06a8dfl3a29r93nxpp6hpywsajz5d555n3sqd3i6krybb6swnvh7";
|
||||
};
|
||||
|
||||
ruy-src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "ruy";
|
||||
rev = "23633b37099b614a2f836ef012cafc8087fdb98c";
|
||||
sha256 = "14k9hz6ss8qy8nsajk6lrq25f6qxrldxky31ijw0dpqnfnnswrx4";
|
||||
};
|
||||
|
||||
cpuinfo-src = fetchFromGitHub {
|
||||
owner = "pytorch";
|
||||
repo = "cpuinfo";
|
||||
rev = "5916273f79a21551890fd3d56fc5375a78d1598d";
|
||||
sha256 = "0q6760xdxsg18acdv8vq3yrq7ksr7wsm8zbyan01zf2khnb6fw4x";
|
||||
buildPlatform = stdenv.buildPlatform;
|
||||
hostPlatform = stdenv.hostPlatform;
|
||||
pythonEnv = buildPackages.python3.withPackages (ps: [ ps.numpy ]);
|
||||
bazelDepsSha256ByBuildAndHost = {
|
||||
x86_64-linux = {
|
||||
x86_64-linux = "sha256-61qmnAB80syYhURWYJOiOnoGOtNa1pPkxfznrFScPAo=";
|
||||
aarch64-linux = "sha256-sOIYpp98wJRz3RGvPasyNEJ05W29913Lsm+oi/aq/Ag=";
|
||||
};
|
||||
aarch64-linux = {
|
||||
aarch64-linux = "sha256-MJU4y9Dt9xJWKgw7iKW+9Ur856rMIHeFD5u05s+Q7rQ=";
|
||||
};
|
||||
};
|
||||
bazelHostConfigName.aarch64-linux = "elinux_aarch64";
|
||||
bazelDepsSha256ByHost =
|
||||
bazelDepsSha256ByBuildAndHost.${buildPlatform.system} or
|
||||
(throw "unsupported build system ${buildPlatform.system}");
|
||||
bazelDepsSha256 = bazelDepsSha256ByHost.${hostPlatform.system} or
|
||||
(throw "unsupported host system ${hostPlatform.system} with build system ${buildPlatform.system}");
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tensorflow-lite";
|
||||
version = "2.5.0";
|
||||
buildBazelPackage rec {
|
||||
name = "tensorflow-lite";
|
||||
version = "2.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tensorflow";
|
||||
repo = "tensorflow";
|
||||
rev = "v${version}";
|
||||
sha256 = "1jdw2i1rq06zqd6aabh7bbm0avsg4pygnfmd7gviv0blhih9054l";
|
||||
hash = "sha256-Rq5pAVmxlWBVnph20fkAwbfy+iuBNlfFy14poDPd5h0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# TODO: remove on the next version bump
|
||||
(fetchpatch {
|
||||
name = "include-schema-conversion-utils-source.patch";
|
||||
url = "https://github.com/tensorflow/tensorflow/commit/f3c4f4733692150fd6174f2cd16438cfaba2e5ab.patch";
|
||||
sha256 = "0zx4hbz679kn79f30159rl1mq74dg45cvaawii0cyv48z472yy4k";
|
||||
})
|
||||
# TODO: remove on the next version bump
|
||||
(fetchpatch {
|
||||
name = "cxxstandard-var.patch";
|
||||
url = "https://github.com/tensorflow/tensorflow/commit/9b128ae4200e10b4752f903492d1e7d11957ed5c.patch";
|
||||
sha256 = "1q0izdwdji5fbyqll6k4dmkzfykyvvz5cvc6hysdj285nkn2wy6h";
|
||||
})
|
||||
bazel = buildPackages.bazel_5;
|
||||
|
||||
nativeBuildInputs = [ pythonEnv buildPackages.perl ];
|
||||
|
||||
bazelTargets = [
|
||||
"//tensorflow/lite:libtensorflowlite.so"
|
||||
"//tensorflow/lite/c:tensorflowlite_c"
|
||||
"//tensorflow/lite/tools/benchmark:benchmark_model"
|
||||
"//tensorflow/lite/tools/benchmark:benchmark_model_performance_options"
|
||||
];
|
||||
|
||||
buildInputs = [ zlib flatbuffers ];
|
||||
bazelFlags = [
|
||||
"--config=opt"
|
||||
] ++ lib.optionals (hostPlatform.system != buildPlatform.system) [
|
||||
"--config=${bazelHostConfigName.${hostPlatform.system}}"
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
bazelBuildFlags = [ "--cxxopt=--std=c++17" ];
|
||||
|
||||
buildAttrs = {
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib}
|
||||
|
||||
# copy the libs and binaries into the output dir
|
||||
cp ./bazel-bin/tensorflow/lite/c/libtensorflowlite_c.so $out/lib
|
||||
cp ./bazel-bin/tensorflow/lite/libtensorflowlite.so $out/lib
|
||||
cp ./bazel-bin/tensorflow/lite/tools/benchmark/benchmark_model $out/bin
|
||||
cp ./bazel-bin/tensorflow/lite/tools/benchmark/benchmark_model_performance_options $out/bin
|
||||
|
||||
find . -type f -name '*.h' | while read f; do
|
||||
path="$out/include/''${f/.\//}"
|
||||
install -D "$f" "$path"
|
||||
|
||||
# remove executable bit from headers
|
||||
chmod -x "$path"
|
||||
done
|
||||
'';
|
||||
};
|
||||
|
||||
fetchAttrs.sha256 = bazelDepsSha256;
|
||||
|
||||
PYTHON_BIN_PATH = pythonEnv.interpreter;
|
||||
|
||||
dontAddBazelOpts = true;
|
||||
removeRulesCC = false;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ./tensorflow/lite/tools/make/Makefile \
|
||||
--replace /bin/bash ${bash}/bin/bash \
|
||||
--replace /bin/sh ${bash}/bin/sh
|
||||
rm .bazelversion
|
||||
'';
|
||||
|
||||
makefile = "tensorflow/lite/tools/make/Makefile";
|
||||
|
||||
preBuild =
|
||||
let
|
||||
includes =
|
||||
lib.concatMapStringsSep
|
||||
" "
|
||||
(subdir: "-I $PWD/tensorflow/lite/tools/make/downloads/${subdir}")
|
||||
[
|
||||
"neon_2_sse"
|
||||
"gemmlowp"
|
||||
"absl"
|
||||
"fp16/include"
|
||||
"farmhash/src"
|
||||
"ruy"
|
||||
"cpuinfo"
|
||||
"cpuinfo/src"
|
||||
"cpuinfo/include"
|
||||
"cpuinfo/deps/clog/include"
|
||||
"eigen"
|
||||
];
|
||||
in
|
||||
''
|
||||
# enter the vendoring lair of doom
|
||||
|
||||
prefix="$PWD/tensorflow/lite/tools/make/downloads"
|
||||
|
||||
mkdir -p "$prefix"
|
||||
|
||||
tar xzf ${fft2d-src} -C "$prefix"
|
||||
|
||||
ln -s ${ruy-src} "$prefix/ruy"
|
||||
ln -s ${gemmlowp-src} "$prefix/gemmlowp"
|
||||
ln -s ${neon-2-sse-src} "$prefix/neon_2_sse"
|
||||
ln -s ${farmhash-src} "$prefix/farmhash"
|
||||
ln -s ${cpuinfo-src} "$prefix/cpuinfo"
|
||||
ln -s ${fp16-src} "$prefix/fp16"
|
||||
ln -s ${tflite-eigen} "$prefix/eigen"
|
||||
|
||||
# tensorflow lite is using the *source* of flatbuffers
|
||||
ln -s ${flatbuffers.src} "$prefix/flatbuffers"
|
||||
|
||||
# tensorflow lite expects to compile abseil into `libtensorflow-lite.a`
|
||||
ln -s ${abseil-cpp.src} "$prefix/absl"
|
||||
|
||||
# set CXXSTANDARD=c++17 here because abseil-cpp in nixpkgs is set as
|
||||
# such and would be used in dependents like libedgetpu
|
||||
buildFlagsArray+=(
|
||||
INCLUDES="-I $PWD ${includes}"
|
||||
CXXSTANDARD="-std=c++17"
|
||||
TARGET_TOOLCHAIN_PREFIX=""
|
||||
-j$NIX_BUILD_CORES
|
||||
all)
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir "$out"
|
||||
|
||||
# copy the static lib and binaries into the output dir
|
||||
cp -r ./tensorflow/lite/tools/make/gen/linux_${stdenv.hostPlatform.uname.processor}/{bin,lib} "$out"
|
||||
|
||||
find ./tensorflow/lite -type f -name '*.h' | while read f; do
|
||||
path="$out/include/''${f/.\//}"
|
||||
install -D "$f" "$path"
|
||||
|
||||
# remove executable bit from headers
|
||||
chmod -x "$path"
|
||||
done
|
||||
preConfigure = ''
|
||||
patchShebangs configure
|
||||
'';
|
||||
|
||||
# configure script freaks out when parameters are passed
|
||||
dontAddPrefix = true;
|
||||
configurePlatforms = [];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source deep learning framework for on-device inference.";
|
||||
homepage = "https://www.tensorflow.org/lite";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ cpcloud ];
|
||||
maintainers = with maintainers; [ mschwaig cpcloud ];
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||
knownVulnerabilities = [
|
||||
# at least some of
|
||||
"CVE-2023-27579"
|
||||
"CVE-2023-25801"
|
||||
"CVE-2023-25676"
|
||||
"CVE-2023-25675"
|
||||
"CVE-2023-25674"
|
||||
"CVE-2023-25673"
|
||||
"CVE-2023-25671"
|
||||
"CVE-2023-25670"
|
||||
"CVE-2023-25669"
|
||||
"CVE-2023-25668"
|
||||
"CVE-2023-25667"
|
||||
"CVE-2023-25665"
|
||||
"CVE-2023-25666"
|
||||
"CVE-2023-25664"
|
||||
"CVE-2023-25663"
|
||||
"CVE-2023-25662"
|
||||
"CVE-2023-25660"
|
||||
"CVE-2023-25659"
|
||||
"CVE-2023-25658"
|
||||
# and many many more
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildPythonPackage
|
||||
, packaging
|
||||
, setuptools
|
||||
, pkgconfig
|
||||
, freetype
|
||||
, pytest
|
||||
, python
|
||||
, pillow
|
||||
@ -10,6 +14,7 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "aggdraw";
|
||||
version = "1.3.16";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pytroll";
|
||||
@ -18,6 +23,16 @@ buildPythonPackage rec {
|
||||
hash = "sha256-2yajhuRyQ7BqghbSgPClW3inpw4TW2DhgQbomcRFx94=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
packaging
|
||||
setuptools
|
||||
pkgconfig
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
freetype
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
numpy
|
||||
pillow
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, setuptools
|
||||
}:
|
||||
@ -10,14 +10,19 @@ buildPythonPackage rec {
|
||||
version = "2.5.1";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-9p0xo7Vu7hGdHsYGPpxzLdRPu6NS73OMsi2WmfxACf4=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "thombashi";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-0wzoQDHB7Tt80ZTlKrNxFutztsgUuin5D2eb80c4PBI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
setuptools
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
@ -29,6 +34,6 @@ buildPythonPackage rec {
|
||||
homepage = "https://github.com/thombashi/allpairspy";
|
||||
changelog = "https://github.com/thombashi/allpairspy/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
maintainers = with maintainers; [ nickcao ];
|
||||
};
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "igraph";
|
||||
version = "0.10.4";
|
||||
version = "0.10.6";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
||||
owner = "igraph";
|
||||
repo = "python-igraph";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-DR4D12J/BKFpF4hMHfitNmwDZ7UEo+pI0tvEa1T5GTY=";
|
||||
hash = "sha256-xdzk/gcHL/kFpZabdP7Cq4lUv0aEwpevgLJYqfb2KGY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -0,0 +1,32 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, jupyter-core
|
||||
, notebook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jupyter-contrib-core";
|
||||
version = "0.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jupyter-contrib";
|
||||
repo = "jupyter_contrib_core";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-UTtK+aKxBFkqKuHrt1ox8vdHyFz/9HiKFl7U4UQcG88=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
jupyter-core
|
||||
notebook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "jupyter_contrib_core" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Common utilities for jupyter-contrib projects";
|
||||
homepage = "https://github.com/jupyter-contrib/jupyter_contrib_core";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ GaetanLepage ];
|
||||
};
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, jupyter-contrib-core
|
||||
, jupyter-highlight-selected-word
|
||||
, jupyter-nbextensions-configurator
|
||||
, lxml
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jupyter-contrib-nbextensions";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ipython-contrib";
|
||||
repo = "jupyter_contrib_nbextensions";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-1o8tBfRw6jNcKfNE7xXrQaEhx+KOv7mLOruvuMDtJ1Q=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
jupyter-contrib-core
|
||||
jupyter-highlight-selected-word
|
||||
jupyter-nbextensions-configurator
|
||||
lxml
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "jupyter_contrib_nbextensions" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A collection of various notebook extensions for Jupyter";
|
||||
homepage = "https://github.com/ipython-contrib/jupyter_contrib_nbextensions";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ GaetanLepage ];
|
||||
};
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jupyter-highlight-selected-word";
|
||||
version = "0.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jcb91";
|
||||
repo = "jupyter_highlight_selected_word";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-KgM//SIfES46uZySwNR4ZOcolnJORltvThsmEvxXoIs=";
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "jupyter_highlight_selected_word" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Jupyter notebook extension that enables highlighting every instance of the current word in the notebook";
|
||||
homepage = "https://github.com/jcb91/jupyter_highlight_selected_word";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ GaetanLepage ];
|
||||
};
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, jupyter-contrib-core
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jupyter-nbextensions-configurator";
|
||||
version = "0.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jupyter-contrib";
|
||||
repo = "jupyter_nbextensions_configurator";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-ovKYHATRAC5a5qTMv32ohU2gJd15/fRKXa5HI0zGp/0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ jupyter-contrib-core ];
|
||||
|
||||
pythonImportsCheck = [ "jupyter_nbextensions_configurator" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A jupyter notebook serverextension providing config interfaces for nbextensions";
|
||||
homepage = "https://github.com/jupyter-contrib/jupyter_nbextensions_configurator";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ GaetanLepage ];
|
||||
};
|
||||
}
|
@ -9,6 +9,7 @@
|
||||
, mock
|
||||
, requests
|
||||
, requests-toolbelt
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
let
|
||||
@ -38,6 +39,7 @@ buildPythonPackage rec {
|
||||
requests
|
||||
requests-toolbelt
|
||||
pyjwt
|
||||
setuptools
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
|
33
pkgs/development/python-modules/spacy/lookups-data.nix
Normal file
33
pkgs/development/python-modules/spacy/lookups-data.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, setuptools
|
||||
, spacy
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "spacy-lookups-data";
|
||||
version = "1.0.3";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "spacy_lookups_data";
|
||||
inherit version;
|
||||
hash = "sha256-q2hlVI+4ZtR5CQ4xEIp+Je0ZKhH8sJiW5xFjKM3FK+E=";
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
spacy
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "spacy_lookups_data" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Additional lookup tables and data resources for spaCy";
|
||||
homepage = "https://pypi.org/project/spacy-lookups-data";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jboy ];
|
||||
};
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
{ fetchurl, lib, stdenv, zstd
|
||||
, autoPatchelfHook, gcc-unwrapped
|
||||
, testers, buck2 # for passthru.tests
|
||||
}:
|
||||
|
||||
@ -27,15 +26,11 @@ let
|
||||
suffix = {
|
||||
x86_64-darwin = "x86_64-apple-darwin";
|
||||
aarch64-darwin = "aarch64-apple-darwin";
|
||||
# TODO (aseipp): there's an aarch64-linux musl build of buck2, but not a
|
||||
# x86_64-linux musl build. keep things consistent for now and use glibc
|
||||
# builds for both; but we should fix this in the future to be less fragile;
|
||||
# we can then remove autoPatchelfHook.
|
||||
x86_64-linux = "x86_64-unknown-linux-gnu";
|
||||
aarch64-linux = "aarch64-unknown-linux-gnu";
|
||||
x86_64-linux = "x86_64-unknown-linux-musl";
|
||||
aarch64-linux = "aarch64-unknown-linux-musl";
|
||||
}."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
buck2-version = "2023-07-11";
|
||||
buck2-version = "2023-07-15";
|
||||
src =
|
||||
let
|
||||
hashes = builtins.fromJSON (builtins.readFile ./hashes.json);
|
||||
@ -48,24 +43,20 @@ stdenv.mkDerivation {
|
||||
version = "unstable-${buck2-version}"; # TODO (aseipp): kill 'unstable' once a non-prerelease is made
|
||||
inherit src;
|
||||
|
||||
buildInputs = lib.optionals stdenv.isLinux [ gcc-unwrapped ]; # need libgcc_s.so.1 for patchelf
|
||||
nativeBuildInputs = [ zstd ]
|
||||
# TODO (aseipp): move to musl build and nuke this?
|
||||
++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
|
||||
nativeBuildInputs = [ zstd ];
|
||||
|
||||
doCheck = true;
|
||||
dontConfigure = true;
|
||||
dontStrip = true;
|
||||
|
||||
unpackPhase = "unzstd ${src} -o ./buck2";
|
||||
buildPhase = "chmod +x ./buck2";
|
||||
checkPhase = "./buck2 --version";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -D buck2 $out/bin/buck2
|
||||
'';
|
||||
|
||||
# NOTE (aseipp): use installCheckPhase instead of checkPhase so that
|
||||
# autoPatchelfHook kicks in first.
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = "$out/bin/buck2 --version";
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update.sh;
|
||||
tests = testers.testVersion {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ "x86_64-linux": "sha256-dVOshrjpsFomstnJsZMPBDfakXOkU+ORbv//fq8Oxss="
|
||||
, "x86_64-darwin": "sha256-BuzA8irlqLWnv5fGUdIHu0grz9smTBdOs5yTUBZLUKg="
|
||||
, "aarch64-linux": "sha256-Thr9RsI7AkumBeraq08KoxDAXYKv63bZUTrTYN0GAss="
|
||||
, "aarch64-darwin": "sha256-vRu0ra6YN7+o1AId6+v0ZLQucO84KwS3Ila6Ksmp1J0="
|
||||
{ "x86_64-linux": "sha256-xd8MZF1xpVYqEDoL3nUBptiFMn9UkgC+zIgfDkDxwfM="
|
||||
, "x86_64-darwin": "sha256-d8GD7SwCM1gcWILkmSLRY7nq2w9+AMxgbGiWwAK0BAo="
|
||||
, "aarch64-linux": "sha256-zBVgIgQ+tlBUuHwsZB5JmQJtWZ5soKP6//NxkU96xmo="
|
||||
, "aarch64-darwin": "sha256-jswrwf37/0Rec551mORXYf+s45Nx16OeaRjRS9ROR4E="
|
||||
}
|
||||
|
@ -4,16 +4,17 @@
|
||||
set -euo pipefail
|
||||
|
||||
VERSION=$(curl -s https://api.github.com/repos/facebook/buck2/releases \
|
||||
| jq -r '. |
|
||||
sort_by(.created_at) | .[] |
|
||||
select ((.prerelease == true) and (.name != "latest")) |
|
||||
.name')
|
||||
| jq -r 'sort_by(.created_at) | reverse |
|
||||
(map
|
||||
(select ((.prerelease == true) and (.name != "latest"))) |
|
||||
first
|
||||
) | .name')
|
||||
echo "Latest buck2 prerelease: $VERSION"
|
||||
|
||||
ARCHS=(
|
||||
"x86_64-linux:x86_64-unknown-linux-gnu"
|
||||
"x86_64-linux:x86_64-unknown-linux-musl"
|
||||
"x86_64-darwin:x86_64-apple-darwin"
|
||||
"aarch64-linux:aarch64-unknown-linux-gnu"
|
||||
"aarch64-linux:aarch64-unknown-linux-musl"
|
||||
"aarch64-darwin:aarch64-apple-darwin"
|
||||
)
|
||||
|
||||
|
@ -1,29 +1,37 @@
|
||||
{ lib, pkgs, stdenv, buildGoModule, fetchFromGitHub, nixosTests
|
||||
, nodejs, debianutils, mkdocs, python3, python3Packages
|
||||
{ lib, pkgs, stdenv, buildGoModule, fetchFromGitHub, buildNpmPackage
|
||||
, nixosTests, debianutils, mkdocs, python3, python3Packages
|
||||
, pkg-config, pixman, cairo, pango }:
|
||||
|
||||
|
||||
let
|
||||
nodeDependencies = (import ./node-composition.nix {
|
||||
inherit pkgs nodejs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
}).nodeDependencies.override {
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ pixman cairo pango ];
|
||||
};
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "ntfy-sh";
|
||||
version = "2.5.0";
|
||||
version = "2.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "binwiederhier";
|
||||
repo = "ntfy";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-C7Ko7JBiQoafos7TbVTqq6pn7NnuLOZo7Dcf6ob2IzI=";
|
||||
hash = "sha256-VX5QXJqHvYE8n/TcSBIg8vuLx2OCe6rM87G1PXBiKRI=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-9mhMeGcAdFjzLJdsGnoTArtxVEaUznpN64j5SMBYHv8=";
|
||||
vendorHash = "sha256-KcA35MVtF/bHtdiMqofs9gSnjl6oYedgqpKZtnFce20=";
|
||||
|
||||
ui = buildNpmPackage {
|
||||
inherit src version;
|
||||
pname = "ntfy-sh-ui";
|
||||
npmDepsHash = "sha256-JvoTssXiBnl/H4odFqRoGtQz2pGwQL4BGxX8Vp/PBwY=";
|
||||
|
||||
prePatch = ''
|
||||
cd web/
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mv build/index.html build/app.html
|
||||
rm build/config.js
|
||||
mkdir -p $out
|
||||
mv build/ $out/site
|
||||
'';
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
@ -32,7 +40,6 @@ buildGoModule rec {
|
||||
nativeBuildInputs = [
|
||||
debianutils
|
||||
mkdocs
|
||||
nodejs
|
||||
python3
|
||||
python3Packages.mkdocs-material
|
||||
python3Packages.mkdocs-minify
|
||||
@ -44,8 +51,8 @@ buildGoModule rec {
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
ln -s ${nodeDependencies}/lib/node_modules web/node_modules
|
||||
DISABLE_ESLINT_PLUGIN=true npm_config_offline=true make web-build docs-build
|
||||
cp -r ${ui}/site/ server/
|
||||
make docs-build
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ROOT="$(realpath "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")"/../../../..)"
|
||||
|
||||
$(nix-build $ROOT -A nodePackages.node2nix --no-out-link)/bin/node2nix \
|
||||
--nodejs-18 \
|
||||
--node-env ../../../development/node-packages/node-env.nix \
|
||||
--output node-packages.nix \
|
||||
--composition node-composition.nix
|
||||
# removed temporarily because of https://github.com/svanderburg/node2nix/issues/312
|
||||
# --lock ./package-lock-temp.json \
|
@ -1,17 +0,0 @@
|
||||
# This file has been generated by node2nix 1.11.1. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs_18"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ../../../development/node-packages/node-env.nix {
|
||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
|
||||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
in
|
||||
import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
|
||||
inherit nodeEnv;
|
||||
}
|
15694
pkgs/tools/misc/ntfy-sh/node-packages.nix
generated
15694
pkgs/tools/misc/ntfy-sh/node-packages.nix
generated
File diff suppressed because it is too large
Load Diff
@ -1,44 +0,0 @@
|
||||
{
|
||||
"name": "ntfy",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.8.2",
|
||||
"@emotion/styled": "^11.8.1",
|
||||
"@mui/icons-material": "^5.4.2",
|
||||
"@mui/material": "latest",
|
||||
"dexie": "^3.2.1",
|
||||
"dexie-react-hooks": "^1.1.1",
|
||||
"humanize-duration": "^3.27.3",
|
||||
"i18next": "^21.6.14",
|
||||
"i18next-browser-languagedetector": "^6.1.4",
|
||||
"i18next-http-backend": "^1.4.0",
|
||||
"js-base64": "^3.7.2",
|
||||
"react": "latest",
|
||||
"react-dom": "latest",
|
||||
"react-i18next": "^11.16.2",
|
||||
"react-infinite-scroll-component": "^6.1.0",
|
||||
"react-router-dom": "^6.2.2",
|
||||
"react-scripts": "^5.0.0",
|
||||
"stacktrace-gps": "^3.0.4",
|
||||
"stacktrace-js": "^2.0.2"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
}
|
||||
}
|
@ -1,24 +1,22 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p nodePackages.node2nix curl jq nix
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p gnugrep gnused coreutils curl wget jq nix-update prefetch-npm-deps nodejs
|
||||
|
||||
set -euo pipefail
|
||||
# cd to the folder containing this script
|
||||
cd "$(dirname "$0")"
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
CURRENT_VERSION=$(nix-instantiate ../../../../. --eval --strict -A ntfy-sh.version | tr -d '"')
|
||||
TARGET_VERSION="$(curl -sL https://api.github.com/repos/binwiederhier/ntfy/releases/latest | jq --exit-status -r ".tag_name")"
|
||||
version=$(curl -s "https://api.github.com/repos/binwiederhier/ntfy/tags" | jq -r .[0].name | grep -oP "^v\K.*")
|
||||
url="https://raw.githubusercontent.com/binwiederhier/ntfy/v$version/"
|
||||
|
||||
if [[ "v$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then
|
||||
echo "ntfy-sh is up-to-date: ${CURRENT_VERSION}"
|
||||
if [[ "$UPDATE_NIX_OLD_VERSION" == "$version" ]]; then
|
||||
echo "Already up to date!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "ntfy-sh: $CURRENT_VERSION -> $TARGET_VERSION"
|
||||
rm -f package-lock.json
|
||||
wget "$url/web/package-lock.json"
|
||||
npm_hash=$(prefetch-npm-deps package-lock.json)
|
||||
sed -i 's#npmDepsHash = "[^"]*"#npmDepsHash = "'"$npm_hash"'"#' default.nix
|
||||
rm -f package-lock.json
|
||||
|
||||
rm -f package.json package-lock.json
|
||||
curl -sLO https://github.com/binwiederhier/ntfy/raw/$TARGET_VERSION/web/package.json
|
||||
curl -sL -o package-lock-temp.json https://github.com/binwiederhier/ntfy/raw/$TARGET_VERSION/web/package-lock.json
|
||||
|
||||
./generate-dependencies.sh
|
||||
|
||||
rm ./package-lock-temp.json
|
||||
popd
|
||||
nix-update ntfy-sh --version $version
|
||||
|
@ -33443,12 +33443,7 @@ with pkgs;
|
||||
autoreconfHook = buildPackages.autoreconfHook269;
|
||||
};
|
||||
|
||||
# TODO: we should probably merge these 2
|
||||
musescore =
|
||||
if stdenv.isDarwin then
|
||||
callPackage ../applications/audio/musescore/darwin.nix { }
|
||||
else
|
||||
libsForQt5.callPackage ../applications/audio/musescore { };
|
||||
musescore = libsForQt5.callPackage ../applications/audio/musescore { };
|
||||
|
||||
music-player = callPackage ../applications/audio/music-player { };
|
||||
|
||||
|
@ -5429,14 +5429,22 @@ self: super: with self; {
|
||||
|
||||
jupyter-client = callPackage ../development/python-modules/jupyter-client { };
|
||||
|
||||
jupyter-contrib-core = callPackage ../development/python-modules/jupyter-contrib-core { };
|
||||
|
||||
jupyter-contrib-nbextensions = callPackage ../development/python-modules/jupyter-contrib-nbextensions { };
|
||||
|
||||
jupyter_console = callPackage ../development/python-modules/jupyter_console { };
|
||||
|
||||
jupyter-core = callPackage ../development/python-modules/jupyter-core { };
|
||||
|
||||
jupyter-events = callPackage ../development/python-modules/jupyter-events { };
|
||||
|
||||
jupyter-highlight-selected-word = callPackage ../development/python-modules/jupyter-highlight-selected-word { };
|
||||
|
||||
jupyter-lsp = callPackage ../development/python-modules/jupyter-lsp { };
|
||||
|
||||
jupyter-nbextensions-configurator = callPackage ../development/python-modules/jupyter-nbextensions-configurator { };
|
||||
|
||||
jupyter-server = callPackage ../development/python-modules/jupyter-server { };
|
||||
|
||||
jupyter-server-fileid = callPackage ../development/python-modules/jupyter-server-fileid { };
|
||||
@ -11709,6 +11717,8 @@ self: super: with self; {
|
||||
|
||||
spacy-loggers = callPackage ../development/python-modules/spacy-loggers { };
|
||||
|
||||
spacy-lookups-data = callPackage ../development/python-modules/spacy/lookups-data.nix { };
|
||||
|
||||
spacy_models = callPackage ../development/python-modules/spacy/models.nix {
|
||||
inherit (pkgs) jq;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user