1

reformat using alejandra

This commit is contained in:
2023-01-18 14:00:02 +01:00
parent 3ad68f24d6
commit eb44696de3
43 changed files with 1283 additions and 1095 deletions

View File

@ -1,5 +1,8 @@
{ lib, stdenv, src }:
{
lib,
stdenv,
src,
}:
stdenv.mkDerivation {
pname = "adwaita-for-steam";
version = "unstable";

View File

@ -1,6 +1,8 @@
{ stdenv, lib, pkgs }:
let
{
stdenv,
lib,
pkgs,
}: let
inherit (pkgs.python310Packages) buildPythonPackage buildPythonApplication fetchPypi;
# Too old in nixpkgs
@ -13,7 +15,7 @@ let
sha256 = "9107f1ca0b2a5553987a94a3c9959fe5b491fdf731389aa5b7b1bd0733e32de6";
};
propagatedBuildInputs = with pkgs.python310Packages; [ ];
propagatedBuildInputs = with pkgs.python310Packages; [];
doCheck = false;
};
@ -51,7 +53,7 @@ let
sha256 = "0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14";
};
propagatedBuildInputs = with pkgs.python310Packages; [ ];
propagatedBuildInputs = with pkgs.python310Packages; [];
doCheck = false;
};
@ -65,7 +67,7 @@ let
sha256 = "1cc54630f1f4cbc09654ded012b4a5cd4992aa6ee67442dbba873edd63d01eff";
};
propagatedBuildInputs = with pkgs.python310Packages; [ requests ];
propagatedBuildInputs = with pkgs.python310Packages; [requests];
doCheck = false;
};
@ -79,75 +81,67 @@ let
sha256 = "252a9c6eee001d67bb000ceb8fdf99729c06cf46ff18a00fc89468672388de1e";
};
propagatedBuildInputs = with pkgs.python310Packages; [ requests pycryptodome ];
propagatedBuildInputs = with pkgs.python310Packages; [requests pycryptodome];
doCheck = false;
};
# TODO: When new version is in nixpkgs update this derivation
# Too old in nixpkgs
# my-setuptools = buildPythonPackage rec {
# version = "65.5.0";
# pname = "setuptools";
# src = fetchPypi {
# inherit version pname;
# sha256 = "512e5536220e38146176efb833d4a62aa726b7bbff82cfbc8ba9eaa3996e0b17";
# };
# # From https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/setuptools/default.nix#L75
# # nativeBuildInputs = [
# # bootstrapped-pip
# # (pipInstallHook.override{pip=null;})
# # (setuptoolsBuildHook.override{setuptools=null; wheel=null;})
# # ];
# # preBuild = lib.optionalString (!stdenv.hostPlatform.isWindows) ''
# # export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
# # '';
# pipInstallFlags = [ "--ignore-installed" ];
# # Adds setuptools to nativeBuildInputs causing infinite recursion.
# # catchConflicts = false;
# propagatedBuildInputs = with pkgs.python310Packages; [ ];
# doCheck = false;
# };
in
buildPythonApplication rec {
version = "3.4.14";
pname = "cyberdrop-dl";
src = fetchPypi {
inherit version pname;
sha256 = "bdf1e21452571a74bf4448d32b158b8600381f210696dd60d16fc83213793559";
};
in buildPythonApplication rec {
version = "3.4.14";
pname = "cyberdrop-dl";
propagatedBuildInputs = with pkgs.python310Packages; [
my-aiofiles
my-aiohttp
beautifulsoup4
my-certifi
colorama
gofile-client
myjdapi
pyyaml
# Needed in the latest versions, don't know how to make it work right now...
# my-setuptools
tqdm
yarl
];
src = fetchPypi {
inherit version pname;
sha256 = "bdf1e21452571a74bf4448d32b158b8600381f210696dd60d16fc83213793559";
};
doCheck = false;
propagatedBuildInputs = with pkgs.python310Packages; [
my-aiofiles
my-aiohttp
beautifulsoup4
my-certifi
colorama
gofile-client
myjdapi
pyyaml
# Needed in the latest versions, don't know how to make it work right now...
# my-setuptools
tqdm
yarl
];
# Otherwise duplicates are found in closure (certifi), don't know why this happens
# TODO: Investigate duplicates
catchConflicts = false;
doCheck = false;
# Otherwise duplicates are found in closure (certifi), don't know why this happens
# TODO: Investigate duplicates
catchConflicts = false;
meta = with lib; {
homepage = "https://github.com/Jules-WinnfieldX/CyberDropDownloader";
description = "Bulk downloader for multiple file hosts";
license = licenses.gpl3Only;
};
}
meta = with lib; {
homepage = "https://github.com/Jules-WinnfieldX/CyberDropDownloader";
description = "Bulk downloader for multiple file hosts";
license = licenses.gpl3Only;
};
}

View File

@ -3,10 +3,7 @@
# /nix/store/z3gxkwakzgiswvakfrpbirhpcach509j-mutter-42.3/share/gsettings-schemas/mutter-42.3
# but this is the wrong path for dconf-editor to find the schema, correct one would be
# /nix/store/z3gxkwakzgiswvakfrpbirhpcach509j-mutter-42.3/share/gsettings-schemas/mutter-42.3/glib-2.0/schemas
{ pkgs }:
let
{pkgs}: let
find-gsettings-schemas = pkgs.callPackage ./find-gsettings-schemas.nix {};
dconf-editor-wrapped = pkgs.writeShellScriptBin "dconf-editor-wrapped" ''
@ -20,7 +17,7 @@ let
icon = "ca.desrt.dconf-editor";
comment = "Modify the Gnome/GTK settings database";
genericName = "Desktop application to manage Gnome/GTK settings.";
categories = [ "GNOME" "GTK" "System" ];
categories = ["GNOME" "GTK" "System"];
};
in
# Combine multiple derivations into a single store path
@ -30,4 +27,4 @@ in
dconf-editor-wrapped
desktop-icon
];
}
}

View File

@ -1,5 +1,4 @@
{ pkgs, ... }:
{pkgs, ...}:
pkgs.writeShellScriptBin "find-gsettings-schemas" ''
schemas=""
for d in $(ls -1 --ignore "*.drv" /nix/store); do
@ -10,4 +9,4 @@ pkgs.writeShellScriptBin "find-gsettings-schemas" ''
done
echo "$schemas"
''
''

View File

@ -1,11 +1,12 @@
{ inputs, pkgs }:
{
inputs,
pkgs,
}: {
# vital-synth = pkgs.callPackage ./vital-synth {}; # Kept as an example, don't know if I will fix this or keep using distrho
cyberdrop-dl = pkgs.callPackage ./cyberdrop-dl {};
firefox-gnome-theme = pkgs.callPackage ./firefox-gnome-theme { src = inputs.firefox-gnome-theme; };
adwaita-for-steam = pkgs.callPackage ./adwaita-for-steam { src = inputs.adwaita-for-steam; };
firefox-gnome-theme = pkgs.callPackage ./firefox-gnome-theme {src = inputs.firefox-gnome-theme;};
adwaita-for-steam = pkgs.callPackage ./adwaita-for-steam {src = inputs.adwaita-for-steam;};
dconf-editor-wrapped = pkgs.callPackage ./dconf-editor-wrapped {};
bitwig-studio-pipewire = pkgs.callPackage ./bitwig-studio-pipewire {};
oversteer = pkgs.callPackage ./oversteer {};
}
}

View File

@ -1,13 +1,14 @@
# Taken from https://github.com/tadfisher/flake/blob/main/pkgs/firefox-gnome-theme/default.nix
# We don't use fetchTarbal or fetchFromGithub because we are using flakes:
# - Specify the firefox-gnome-theme github repo as input in flake.nix
# - We don't need to add sha256 or commit revision because it is automatically locked in flake.lock
# - Pass the input to overlays/default.nix and from there to derivations/default.nix
# - There we plug the input into the src argument of this derivation
{ lib, stdenv, src }:
{
lib,
stdenv,
src,
}:
stdenv.mkDerivation {
pname = "firefox-gnome-theme";
version = "unstable";
@ -28,4 +29,4 @@ stdenv.mkDerivation {
homepage = "https://github.com/rafaelmardojai/firefox-gnome-theme";
license = licenses.unlicense;
};
}
}

View File

@ -1,8 +1,23 @@
# Taken from https://github.com/NixOS/nixpkgs/pull/176779/files
{ lib, stdenv, meson, ninja, pkg-config, gettext, cmake, udev, fetchFromGitHub, python3
, wrapGAppsHook, gtk3, glib, gnome, appstream-glib, gobject-introspection, desktop-file-utils }:
{
lib,
stdenv,
meson,
ninja,
pkg-config,
gettext,
cmake,
udev,
fetchFromGitHub,
python3,
wrapGAppsHook,
gtk3,
glib,
gnome,
appstream-glib,
gobject-introspection,
desktop-file-utils,
}:
python3.pkgs.buildPythonApplication rec {
pname = "oversteer";
version = "0.7.1";
@ -44,9 +59,9 @@ python3.pkgs.buildPythonApplication rec {
udev
];
buildInputs = [ udev gtk3 glib gnome.adwaita-icon-theme python3 ];
buildInputs = [udev gtk3 glib gnome.adwaita-icon-theme python3];
propagatedBuildInputs = with python3.pkgs; [ pyudev pyxdg evdev pygobject3 matplotlib scipy ];
propagatedBuildInputs = with python3.pkgs; [pyudev pyxdg evdev pygobject3 matplotlib scipy];
meta = with lib; {
description = "Application to configure Logitech steering wheels on Linux";

View File

@ -1,90 +1,96 @@
# Has a problem with vertically offset UI, replaced by distrho for now but kept as an example
# TODO: Flake derivation
# Damn I hate this style
{ lib
, stdenv
, fetchurl
, dpkg
, autoPatchelfHook
, alsa-lib
, freetype
, gcc
, glib
, glibc
, curlWithGnuTls
, libGL
, libglvnd
, libsecret
{
lib,
stdenv,
fetchurl,
dpkg,
autoPatchelfHook,
alsa-lib,
freetype,
gcc,
glib,
glibc,
curlWithGnuTls,
libGL,
libglvnd,
libsecret,
}:
# Adapted from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vital-synth
# Example https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix
let
# Variables from AUR pkgbuild
maintainer = "jackreeds";
pkgname_deb = "VitalInstaller";
in
stdenv.mkDerivation rec {
pname = "vital-synth";
version = "1.0.8";
in stdenv.mkDerivation rec {
pname = "vital-synth";
version = "1.0.8";
src = fetchurl {
url = "https://github.com/${maintainer}/${pkgname_deb}/releases/download/${version}/${pkgname_deb}.deb";
sha512 = "829d29a0c41ac9f79ca6d069e2e4f404a501abdcdc487fbb4e1e8afd44bf870c6c41095587c98f810fb946d946179468f8d5f417e67785313152a1613cf4a832";
};
src = fetchurl {
url = "https://github.com/${maintainer}/${pkgname_deb}/releases/download/${version}/${pkgname_deb}.deb";
sha512 = "829d29a0c41ac9f79ca6d069e2e4f404a501abdcdc487fbb4e1e8afd44bf870c6c41095587c98f810fb946d946179468f8d5f417e67785313152a1613cf4a832";
};
# autoPatchelfHook patches the binary to use the dynamic loader and "tells it" where all the libraries are that
# the program wants to dynamically load at runtime.
# This is necessary because NixOS doesn't have the linux typical static location where these libraries are placed,
# so the binary needs the correct paths to the nix store for each one.
# autoPatchelfHook propagates all the buildInputs so they are available at runtime.
# View also:
# https://nixos.org/manual/nixpkgs/unstable/#setup-hook-autopatchelfhook
# https://nixos.wiki/wiki/Packaging/Binaries
# https://unix.stackexchange.com/questions/522822/different-methods-to-run-a-non-nixos-executable-on-nixos/522823#522823
nativeBuildInputs = [
dpkg
autoPatchelfHook
];
# autoPatchelfHook patches the binary to use the dynamic loader and "tells it" where all the libraries are that
# the program wants to dynamically load at runtime.
# This is necessary because NixOS doesn't have the linux typical static location where these libraries are placed,
# so the binary needs the correct paths to the nix store for each one.
# autoPatchelfHook propagates all the buildInputs so they are available at runtime.
# View also:
# https://nixos.org/manual/nixpkgs/unstable/#setup-hook-autopatchelfhook
# https://nixos.wiki/wiki/Packaging/Binaries
# https://unix.stackexchange.com/questions/522822/different-methods-to-run-a-non-nixos-executable-on-nixos/522823#522823
nativeBuildInputs = [
dpkg
autoPatchelfHook
];
# We downloaded a .deb file, unpack it to root = [ usr/bin usr/lib usr/share ]
unpackCmd = ''
mkdir -p root
dpkg-deb -x $curSrc root
'';
# This is already built
dontBuild = true;
# From AUR pkgbuild:
# depends=('alsa-lib>=1.0.16' 'freetype2>=2.2.1' 'gcc-libs' 'gcc>=3.3.1' 'glib2>=2.12.0' 'glibc>=2.17'
# 'libcurl-gnutls>=7.16.2' 'libgl' 'libglvnd' 'libsecret>=0.7')
buildInputs = [
alsa-lib freetype gcc.cc.lib gcc.cc glib glibc curlWithGnuTls libGL libglvnd libsecret
];
# Copy the contents of the .deb package to the $out directory that nix creates for built derivations
# Very simple as the vital .deb has a very basic format (only [ usr/bin usr/lib usr/share ])
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r usr/* $out/
chmod +x $out/bin/vital
runHook postInstall
'';
meta = with lib; {
description = "A wavetable synthesizer.";
longDescription = ''
Powerful wavetable synthesizer with realtime modulation feedback.
Vital is a MIDI enabled polyphonic music synthesizer with an easy to use
parameter modulation system with real-time graphical feedback.
# We downloaded a .deb file, unpack it to root = [ usr/bin usr/lib usr/share ]
unpackCmd = ''
mkdir -p root
dpkg-deb -x $curSrc root
'';
homepage = "https://vital.audio/";
license = licenses.gpl3Only;
platforms = [ "x86_64-linux" ];
};
}
# This is already built
dontBuild = true;
# From AUR pkgbuild:
# depends=('alsa-lib>=1.0.16' 'freetype2>=2.2.1' 'gcc-libs' 'gcc>=3.3.1' 'glib2>=2.12.0' 'glibc>=2.17'
# 'libcurl-gnutls>=7.16.2' 'libgl' 'libglvnd' 'libsecret>=0.7')
buildInputs = [
alsa-lib
freetype
gcc.cc.lib
gcc.cc
glib
glibc
curlWithGnuTls
libGL
libglvnd
libsecret
];
# Copy the contents of the .deb package to the $out directory that nix creates for built derivations
# Very simple as the vital .deb has a very basic format (only [ usr/bin usr/lib usr/share ])
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r usr/* $out/
chmod +x $out/bin/vital
runHook postInstall
'';
meta = with lib; {
description = "A wavetable synthesizer.";
longDescription = ''
Powerful wavetable synthesizer with realtime modulation feedback.
Vital is a MIDI enabled polyphonic music synthesizer with an easy to use
parameter modulation system with real-time graphical feedback.
'';
homepage = "https://vital.audio/";
license = licenses.gpl3Only;
platforms = ["x86_64-linux"];
};
}