A complete reformatting to match nixpkgs-fmt

This commit is contained in:
Greg Hellings
2024-10-03 11:26:39 -05:00
parent e2f0856102
commit 78c802d32c
114 changed files with 5246 additions and 5089 deletions
+7 -7
View File
@@ -1,10 +1,10 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "aacs" ''
set -ex
[ ! -d "''${HOME}/.config/aacs" ] && mkdir -p "''${HOME}/.config/aacs"
cd "''${HOME}/.config/aacs"
[ -f KEYDB.cfg.zip ] && rm -f KEYDB.cfg.zip
curl -L -o KEYDB.cfg.zip "http://fvonline-db.bplaced.net/fv_download.php?lang=eng"
${pkgs.unzip}/bin/unzip KEYDB.cfg.zip
mv keydb.cfg KEYDB.cfg''
set -ex
[ ! -d "''${HOME}/.config/aacs" ] && mkdir -p "''${HOME}/.config/aacs"
cd "''${HOME}/.config/aacs"
[ -f KEYDB.cfg.zip ] && rm -f KEYDB.cfg.zip
curl -L -o KEYDB.cfg.zip "http://fvonline-db.bplaced.net/fv_download.php?lang=eng"
${pkgs.unzip}/bin/unzip KEYDB.cfg.zip
mv keydb.cfg KEYDB.cfg''
+21 -21
View File
@@ -1,28 +1,28 @@
{ writeShellScriptBin, openssl, ...}:
{ writeShellScriptBin, openssl, ... }:
writeShellScriptBin "create_ssl" ''
set -e -o pipefail
name="''${1}"
root_key="''${2}"
set -e -o pipefail
name="''${1}"
root_key="''${2}"
function usage {
echo "USAGE: create_ssl <cert name> <root path>"
}
function usage {
echo "USAGE: create_ssl <cert name> <root path>"
}
if [ -z "''${name}" ]; then
usage
exit 1
fi
if [ -z "''${name}" ]; then
usage
exit 1
fi
if [ -z "''${root_key}" ]; then
usage
exit 1
fi
if [ -z "''${root_key}" ]; then
usage
exit 1
fi
# Create the certificate key
${openssl}/bin/openssl ecparam -out "''${name}.key" -name prime256v1 -genkey
# Create the CSR
${openssl}/bin/openssl req -name -sha256 -key "''${name}.key" -out "''${name}.csr"
# Sign it
${openssl}/bin/openssl x509 -req -in "''${name}.csr" -CA "''${root_key}.crt" -CAkey "''${root_key}.key" -CAcreateserial -out "''${name}.crt" -days 3650 -sha256
# Create the certificate key
${openssl}/bin/openssl ecparam -out "''${name}.key" -name prime256v1 -genkey
# Create the CSR
${openssl}/bin/openssl req -name -sha256 -key "''${name}.key" -out "''${name}.csr"
# Sign it
${openssl}/bin/openssl x509 -req -in "''${name}.csr" -CA "''${root_key}.crt" -CAkey "''${root_key}.key" -CAcreateserial -out "''${name}.crt" -days 3650 -sha256
''
+72 -68
View File
@@ -1,79 +1,83 @@
final: prev:
let
myPackages = pypackages: with pypackages; [
black
dateutil
ipython
mypy
pylint
pyyaml
responses
ruamel-yaml
tox
typing-extensions
virtualenv
];
myPackages = pypackages: with pypackages; [
black
dateutil
ipython
mypy
pylint
pyyaml
responses
ruamel-yaml
tox
typing-extensions
virtualenv
];
myPython = prev.python312.withPackages myPackages;
macOver = file: og:
if prev.stdenv.isDarwin then
(prev.callPackage file {}) else
prev."${og}";
myPython = prev.python312.withPackages myPackages;
macOver = file: og:
if prev.stdenv.isDarwin then
(prev.callPackage file { }) else
prev."${og}";
buildFirefoxXpiAddon = final.nur.repos.rycee.lib.buildFirefoxXpiAddon;
buildFirefoxXpiAddon = final.nur.repos.rycee.lib.buildFirefoxXpiAddon;
is2405 = prev.lib.versionAtLeast prev.lib.version "24";
is2405 = prev.lib.versionAtLeast prev.lib.version "24";
in rec {
gregpy = myPython;
in
rec {
gregpy = myPython;
## Testing adding python packages in the correct manner
pythonPackagesExtensions = (prev.pythonPackagesExtensions or []) ++ [
(python-final: python-prev: let cp = python-final.callPackage; in {
django-rapyd-modernauth = cp ./django-rapyd-modernauth.nix {};
graypy = cp ./graypy.nix {};
itg-django-utils = cp ./itg-django-utils.nix {};
xonsh-apipenv = cp ./xonsh-apipenv.nix {};
})
];
## Testing adding python packages in the correct manner
pythonPackagesExtensions = (prev.pythonPackagesExtensions or [ ]) ++ [
(python-final: python-prev:
let cp = python-final.callPackage; in {
django-rapyd-modernauth = cp ./django-rapyd-modernauth.nix { };
graypy = cp ./graypy.nix { };
itg-django-utils = cp ./itg-django-utils.nix { };
xonsh-apipenv = cp ./xonsh-apipenv.nix { };
})
];
# My own packages
aacs = prev.callPackage ./aacs.nix {};
create_ssl = prev.callPackage ./create_ssl.nix {};
enwiki-dump = prev.callPackage ./enwiki-dump.nix {};
hms = prev.callPackage ./hms {
pkgs = final.pkgs;
};
inject = prev.callPackage ./inject.nix { inherit (final) pkgs; };
inject-darwin = prev.callPackage ./inject-darwin.nix { inherit (final) pkgs; };
setup-ssh = prev.callPackage ./setup-ssh {
pkgs = final.pkgs;
};
upgrade-pg-cluster = prev.callPackage ./upgrade-pg-cluster.nix {};
# My own packages
aacs = prev.callPackage ./aacs.nix { };
create_ssl = prev.callPackage ./create_ssl.nix { };
enwiki-dump = prev.callPackage ./enwiki-dump.nix { };
hms = prev.callPackage ./hms {
pkgs = final.pkgs;
};
inject = prev.callPackage ./inject.nix { inherit (final) pkgs; };
inject-darwin = prev.callPackage ./inject-darwin.nix { inherit (final) pkgs; };
setup-ssh = prev.callPackage ./setup-ssh {
pkgs = final.pkgs;
};
upgrade-pg-cluster = prev.callPackage ./upgrade-pg-cluster.nix { };
# Overrides of packages
brew = prev.callPackage ./homebrew.nix {};
copier = (if is2405 then prev.copier.overridePythonAttrs (old: {
version = "9.1.0";
src = final.fetchFromGitHub {
owner = "copier-org";
repo = "copier";
rev = "v9.1.0";
hash = "sha256-x5r7Xv4lAOMkR+UIEeSY7LvbYMLpTWYuICYe9ygz1tA=";
postFetch = "rm $out/tests/demo/doc/ma*ana.txt";
};
}) else prev.copier);
libbluray-custom = prev.libbluray.override {
withAACS = true;
withBDplus = true;
};
template = prev.callPackage ./template.nix { };
handbrake = prev.handbrake.override {
libbluray = libbluray-custom;
};
libvirt-greg = prev.libvirt.overrideAttrs {
postInstall = prev.libvirt.postInstall + "rm -r $out/lib/systemd/system/libvirtd.service";
};
pipenv-ivr = prev.callPackage ./pipenv.nix { };
# Overrides of packages
brew = prev.callPackage ./homebrew.nix { };
copier = (if is2405 then
prev.copier.overridePythonAttrs
(old: {
version = "9.1.0";
src = final.fetchFromGitHub {
owner = "copier-org";
repo = "copier";
rev = "v9.1.0";
hash = "sha256-x5r7Xv4lAOMkR+UIEeSY7LvbYMLpTWYuICYe9ygz1tA=";
postFetch = "rm $out/tests/demo/doc/ma*ana.txt";
};
}) else prev.copier);
libbluray-custom = prev.libbluray.override {
withAACS = true;
withBDplus = true;
};
template = prev.callPackage ./template.nix { };
handbrake = prev.handbrake.override {
libbluray = libbluray-custom;
};
libvirt-greg = prev.libvirt.overrideAttrs {
postInstall = prev.libvirt.postInstall + "rm -r $out/lib/systemd/system/libvirtd.service";
};
pipenv-ivr = prev.callPackage ./pipenv.nix { };
}
+45 -46
View File
@@ -1,55 +1,54 @@
{
lib,
buildPythonPackage,
fetchPypi,
click,
django,
python-dotenv,
pytz,
setuptools,
sqlparse,
zipp
{ lib
, buildPythonPackage
, fetchPypi
, click
, django
, python-dotenv
, pytz
, setuptools
, sqlparse
, zipp
}:
let
pydeps = pypkgs: with pypkgs; [
click
django
python-dotenv
pytz
setuptools
sqlparse
zipp
];
in buildPythonPackage rec {
pname = "django-rapyd-modernauth";
version = "0.0.4";
pydeps = pypkgs: with pypkgs; [
click
django
python-dotenv
pytz
setuptools
sqlparse
zipp
];
in
buildPythonPackage rec {
pname = "django-rapyd-modernauth";
version = "0.0.4";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-kDZjI32LcKsmLI38ruINKOUfi6lWTIqXF5qIQHi0LeQ=";
};
src = fetchPypi {
inherit pname version;
sha256 = "sha256-kDZjI32LcKsmLI38ruINKOUfi6lWTIqXF5qIQHi0LeQ=";
};
meta = with lib; {
description = "A Django application that provides a custom User model where the username is the email address.";
homepage = "https://github.com/karthicraghupathi/django_rapyd_modernauth";
license = licenses.afl20;
maintainers = [];
};
meta = with lib; {
description = "A Django application that provides a custom User model where the username is the email address.";
homepage = "https://github.com/karthicraghupathi/django_rapyd_modernauth";
license = licenses.afl20;
maintainers = [ ];
};
doCheck = false;
doCheck = false;
buildInputs = [
click
django
python-dotenv
pytz
setuptools
sqlparse
zipp
];
buildInputs = [
click
django
python-dotenv
pytz
setuptools
sqlparse
zipp
];
nativeBuildInputs = [
];
nativeBuildInputs = [
];
}
+40 -39
View File
@@ -1,55 +1,56 @@
{ pkgs, ... }:
let
version = "2022.07.20";
date = builtins.replaceStrings ["."] [""] version;
version = "2022.07.20";
date = builtins.replaceStrings [ "." ] [ "" ] version;
in pkgs.writeShellScriptBin "wiki-data" ''
set -eo pipefail
in
pkgs.writeShellScriptBin "wiki-data" ''
set -eo pipefail
function process_file {
file="''${lang}''${1}"
destfile=/var/tmp/''${file}
curl -C - -o "''${destfile}" "https://dumps.wikimedia.your.org/''${lang}wiki/${date}/''${file}"
bzcat "''${destfile}" | ${pkgs.php}/bin/php ${pkgs.mediawiki}/share/mediawiki/maintenance/importDump.php --report 500 | tee "/var/log/mediawiki-''${lang}-import"
rm "''${destfile}"
}
function process_file {
file="''${lang}''${1}"
destfile=/var/tmp/''${file}
curl -C - -o "''${destfile}" "https://dumps.wikimedia.your.org/''${lang}wiki/${date}/''${file}"
bzcat "''${destfile}" | ${pkgs.php}/bin/php ${pkgs.mediawiki}/share/mediawiki/maintenance/importDump.php --report 500 | tee "/var/log/mediawiki-''${lang}-import"
rm "''${destfile}"
}
function zim_fetch {
dest="/srv/zims"
mkdir -p "''${dest}"
file="''${1}"
echo "Downloading ''${file}"
transmission-remote -w "''${dest}" -a https://download.kiwix.org/zim/''${file}.zim.torrent
}
function zim_fetch {
dest="/srv/zims"
mkdir -p "''${dest}"
file="''${1}"
echo "Downloading ''${file}"
transmission-remote -w "''${dest}" -a https://download.kiwix.org/zim/''${file}.zim.torrent
}
#process_file "wiki-${date}-pages-articles-multistream.xml.bz2"
#process_file "wiki-${date}-pages-meta-current.xml.bz2"
#process_file "wiki-${date}-pages-articles.xml.bz2"
#process_file "wiki-${date}-pages-articles-multistream.xml.bz2"
#process_file "wiki-${date}-pages-meta-current.xml.bz2"
#process_file "wiki-${date}-pages-articles.xml.bz2"
zim_fetch wikipedia_en_all_maxi
zim_fetch wikipedia_fr_all_maxi
zim_fetch wikipedia_ht_all_maxi
zim_fetch wikipedia_en_all_maxi
zim_fetch wikipedia_fr_all_maxi
zim_fetch wikipedia_ht_all_maxi
zim_fetch wiktionary_en_all_maxi
zim_fetch wiktionary_fr_all_maxi
zim_fetch wiktionary_en_all_maxi
zim_fetch wiktionary_fr_all_maxi
zim_fetch wikiversity_en_all_maxi
zim_fetch wikiversity_fr_all_maxi
zim_fetch wikiversity_en_all_maxi
zim_fetch wikiversity_fr_all_maxi
zim_fetch wikibooks_en_all_maxi
zim_fetch wikibooks_fr_all_maxi
zim_fetch wikibooks_en_all_maxi
zim_fetch wikibooks_fr_all_maxi
zim_fetch wikisource_en_all_maxi
zim_fetch wikisource_fr_all_maxi
zim_fetch wikisource_en_all_maxi
zim_fetch wikisource_fr_all_maxi
zim_fetch ted_en_science
zim_fetch ted_en_technology
zim_fetch ted_en_science
zim_fetch ted_en_technology
zim_fetch phet_en
zim_fetch phet_fr
zim_fetch phet_ht
zim_fetch phet_en
zim_fetch phet_fr
zim_fetch phet_ht
zim_fetch gutenberg_en_all
zim_fetch gutenberg_fr_all
zim_fetch gutenberg_en_all
zim_fetch gutenberg_fr_all
''
+27 -28
View File
@@ -1,35 +1,34 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
amqplib,
mock,
pytestCheckHook,
requests,
{ lib
, buildPythonPackage
, fetchFromGitHub
, amqplib
, mock
, pytestCheckHook
, requests
,
}:
buildPythonPackage rec {
pname = "graypy";
version = "2.1.0";
pname = "graypy";
version = "2.1.0";
src = fetchFromGitHub {
owner = "severb";
repo = "graypy";
rev = "2.1.0";
hash = "sha256-y1HbJEpqnAgOeB+zXKy3iUT6Lpv0bufjL7+jWUSAjFs=";
};
src = fetchFromGitHub {
owner = "severb";
repo = "graypy";
rev = "2.1.0";
hash = "sha256-y1HbJEpqnAgOeB+zXKy3iUT6Lpv0bufjL7+jWUSAjFs=";
};
nativeCheckInputs = [
amqplib
mock
pytestCheckHook
requests
];
nativeCheckInputs = [
amqplib
mock
pytestCheckHook
requests
];
meta = with lib; {
description = "Python logging handlers that send messages in the Graylog Extended Log Format (GELF).";
homepage = "https://github.com/severb/graypy";
license = licenses.bsd3;
};
meta = with lib; {
description = "Python logging handlers that send messages in the Graylog Extended Log Format (GELF).";
homepage = "https://github.com/severb/graypy";
license = licenses.bsd3;
};
}
+35 -36
View File
@@ -1,43 +1,42 @@
{
lib,
pkgs,
stdenv,
bash,
curl,
git,
ruby,
...}:
{ lib
, pkgs
, stdenv
, bash
, curl
, git
, ruby
, ...
}:
stdenv.mkDerivation rec {
pname = "homebrew-installer";
version = "20230531";
pname = "homebrew-installer";
version = "20230531";
src = pkgs.fetchFromGitHub {
owner = "Homebrew";
repo = "install";
rev = "716a1d024f32890ef75ea82c18a769abc24e9475";
sha256 = "sha256-xhxWWeCJm49bDzmBT2GHSC0CK1SoQArBhfh5sltGY5o=";
};
src = pkgs.fetchFromGitHub {
owner = "Homebrew";
repo = "install";
rev = "716a1d024f32890ef75ea82c18a769abc24e9475";
sha256 = "sha256-xhxWWeCJm49bDzmBT2GHSC0CK1SoQArBhfh5sltGY5o=";
};
buildInputs = [
bash
curl
git
ruby
];
buildInputs = [
bash
curl
git
ruby
];
installPhase = ''
mkdir -p $out/bin/
cp ${src}/install.sh $out/bin/install-homebrew.sh
cp ${src}/uninstall.sh $out/bin/uninstall-homebrew.sh
'';
installPhase = ''
mkdir -p $out/bin/
cp ${src}/install.sh $out/bin/install-homebrew.sh
cp ${src}/uninstall.sh $out/bin/uninstall-homebrew.sh
'';
meta = with lib; {
description = "Runs the homebrew installer";
homepage = "https://github.com/Homebrew/";
license = licenses.bsd2;
platforms = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" "aarch64-linux" ];
maintainers = [ maintainers.greg ];
};
meta = with lib; {
description = "Runs the homebrew installer";
homepage = "https://github.com/Homebrew/";
license = licenses.bsd2;
platforms = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" "aarch64-linux" ];
maintainers = [ maintainers.greg ];
};
}
+24 -25
View File
@@ -1,32 +1,31 @@
{
pkgs,
coreutils,
curl,
gnutar,
nix,
...
{ pkgs
, coreutils
, curl
, gnutar
, nix
, ...
}:
pkgs.writeShellScriptBin "inject-darwin" ''
set -ex
set -o pipefail
set -ex
set -o pipefail
dir="$(${coreutils}/bin/mktemp -d)"
cd "''${dir}"
dir="$(${coreutils}/bin/mktemp -d)"
cd "''${dir}"
# Install nix-darwin
${nix}/bin/nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
./result/bin/darwin-installer
# Install nix-darwin
${nix}/bin/nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
./result/bin/darwin-installer
# Get my configuration
mkdir -p ~/.config/darwin
cd ~/.config/darwin
${curl}/bin/curl -O -L https://github.com/greg-hellings/nixos-config/archive/refs/heads/main.tar.gz
${gnutar}/bin/tar xvzf main.tar.gz --strip-components 1
# Get my configuration
mkdir -p ~/.config/darwin
cd ~/.config/darwin
${curl}/bin/curl -O -L https://github.com/greg-hellings/nixos-config/archive/refs/heads/main.tar.gz
${gnutar}/bin/tar xvzf main.tar.gz --strip-components 1
# Build NixOS for this system
pushd "''${dir}"
${nix}/bin/nix build "~/.config/darwin#darwinConfigurations.$(hostname -s).system"
./result/sw/bin/darwin-rebuild switch --flake ~/.config/darwin
popd
rm -r "''${dir}"
# Build NixOS for this system
pushd "''${dir}"
${nix}/bin/nix build "~/.config/darwin#darwinConfigurations.$(hostname -s).system"
./result/sw/bin/darwin-rebuild switch --flake ~/.config/darwin
popd
rm -r "''${dir}"
''
+42 -43
View File
@@ -1,56 +1,55 @@
{
pkgs,
git,
...
{ pkgs
, git
, ...
}:
pkgs.writeShellScriptBin "inject-nixos-config" ''
hostname="''${1}"
if [ -n "''${hostname}"]; then
echo "You must provide a hostname";
exit 1;
fi
hostname="''${1}"
if [ -n "''${hostname}"]; then
echo "You must provide a hostname";
exit 1;
fi
mv /etc/nixos /etc/nixos.bk
cd /etc
${git}/bin/git clone http://github.com/greg-hellings/nixos-config nixos
mkdir -p "/etc/nixos/hosts/''${hostname}"
mv /etc/nixos /etc/nixos.bk
cd /etc
${git}/bin/git clone http://github.com/greg-hellings/nixos-config nixos
mkdir -p "/etc/nixos/hosts/''${hostname}"
# Prepares everything for the flake usage
#cp /etc/nixos.bk/configuration.nix "/etc/nixos/hosts/''${hostname}/default.nix"
cat << EOF > "/etc/nixos/hosts/''${hostname}/default.nix"
{ pkgs, config, ... }:
# Prepares everything for the flake usage
#cp /etc/nixos.bk/configuration.nix "/etc/nixos/hosts/''${hostname}/default.nix"
cat << EOF > "/etc/nixos/hosts/''${hostname}/default.nix"
{ pkgs, config, ... }:
{
imports = [ ./hardware-configuration.nix ];
{
imports = [ ./hardware-configuration.nix ];
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
networking.hostName = "''${hostname}";
greg = {
home = true;
tailscale.enable = true;
};
}
EOF
cp /etc/nixos.bk/hardware-configuration.nix "/etc/nixos/hosts/''${hostname}/hardware-configuration.nix"
networking.hostName = "''${hostname}";
greg = {
home = true;
tailscale.enable = true;
};
}
EOF
cp /etc/nixos.bk/hardware-configuration.nix "/etc/nixos/hosts/''${hostname}/hardware-configuration.nix"
# Prepare home-manager portion for setup
mkdir -p "/etc/nixos/home/hosts/''${hostname}"
cat << EOF > "/etc/nixos/home/hosts/''${hostname}/default.nix"
{ pkgs, config, ... }:
# Prepare home-manager portion for setup
mkdir -p "/etc/nixos/home/hosts/''${hostname}"
cat << EOF > "/etc/nixos/home/hosts/''${hostname}/default.nix"
{ pkgs, config, ... }:
{
}
EOF
{
}
EOF
# Prepares it for injecting the use case into the flake usage
cp /etc/nixos.bk/hardware-configuration.nix /etc/nixos
chown -R greg nixos
# Prepares it for injecting the use case into the flake usage
cp /etc/nixos.bk/hardware-configuration.nix /etc/nixos
chown -R greg nixos
echo "Now you should be able to just run `nixos-rebuild switch` to enable the flake functionality"
echo "After that and adding the entry to the flake, run `nixos-rebuild boot --flake '.#''${hostname}'` and reboot"
echo "Now you should be able to just run `nixos-rebuild switch` to enable the flake functionality"
echo "After that and adding the entry to the flake, run `nixos-rebuild boot --flake '.#''${hostname}'` and reboot"
''
+26 -27
View File
@@ -1,35 +1,34 @@
{
lib,
buildPythonPackage,
fetchurl,
django,
djangorestframework,
graypy,
setuptools,
{ lib
, buildPythonPackage
, fetchurl
, django
, djangorestframework
, graypy
, setuptools
,
}:
buildPythonPackage rec {
pname = "itg-django-utils";
version = "0.1.11";
pname = "itg-django-utils";
version = "0.1.11";
src = fetchurl {
url = "https://pypi.ivrtechnology.com/packages/itg-django-utils-0.1.12.tar.gz";
hash = "sha256-LbOl4L4UZbRTlLuBL4L3ser6+WDuP3R5a03EIh1xSK8=";
};
src = fetchurl {
url = "https://pypi.ivrtechnology.com/packages/itg-django-utils-0.1.12.tar.gz";
hash = "sha256-LbOl4L4UZbRTlLuBL4L3ser6+WDuP3R5a03EIh1xSK8=";
};
propagatedBuildInputs = [
django
djangorestframework
graypy
setuptools
];
propagatedBuildInputs = [
django
djangorestframework
graypy
setuptools
];
meta = with lib; {
description = "ITG specific stuff";
homepage = "http://www.ivrtechnology.com";
maintainers = [];
};
meta = with lib; {
description = "ITG specific stuff";
homepage = "http://www.ivrtechnology.com";
maintainers = [ ];
};
doCheck = false;
doCheck = false;
}
+20 -19
View File
@@ -1,26 +1,27 @@
{ nixunstable, flake-utils }:
flake-utils.lib.eachDefaultSystemMap (system:
let
pkgs = (import nixunstable { inherit system; });
lib = pkgs.lib;
callPackage = pkgs.lib.callPackageWith pkgs;
python = pkgs.packages.python3;
cp = pkgs.packages.python3.pkgs.callPackage;
in {
hms = pkgs.callPackage ./hms.nix {
inherit pkgs;
};
let
pkgs = (import nixunstable { inherit system; });
lib = pkgs.lib;
callPackage = pkgs.lib.callPackageWith pkgs;
python = pkgs.packages.python3;
cp = pkgs.packages.python3.pkgs.callPackage;
in
{
hms = pkgs.callPackage ./hms.nix {
inherit pkgs;
};
brew = pkgs.callPackage ./homebrew.nix {};
brew = pkgs.callPackage ./homebrew.nix { };
django-rapyd-modernauth = pkgs.python3.pkgs.callPackage ./django-rapyd-modernauth.nix {
buildPythonPackage = pkgs.python3.pkgs.buildPythonPackage;
};
django-rapyd-modernauth = pkgs.python3.pkgs.callPackage ./django-rapyd-modernauth.nix {
buildPythonPackage = pkgs.python3.pkgs.buildPythonPackage;
};
xonsh-direnv = pkgs.callPackage ./xonsh-direnv.nix {
buildPythonPackage = pkgs.python3.pkgs.buildPythonPackage;
fetchPypi = pkgs.python.pkgs.fetchPypi;
};
}
xonsh-direnv = pkgs.callPackage ./xonsh-direnv.nix {
buildPythonPackage = pkgs.python3.pkgs.buildPythonPackage;
fetchPypi = pkgs.python.pkgs.fetchPypi;
};
}
)
+2 -1
View File
@@ -22,7 +22,8 @@ let
pythonEnv = python3.withPackages runtimeDeps;
in buildPythonApplication rec {
in
buildPythonApplication rec {
pname = "pipenv";
version = "2023.11.15";
format = "pyproject";
+1 -1
View File
@@ -1,3 +1,3 @@
{ pkgs, gh, ... }:
pkgs.writeShellScriptBin "setup-ssh" (builtins.replaceStrings ["gh "] ["${gh}/bin/gh "] (builtins.readFile ./setup-ssh.sh))
pkgs.writeShellScriptBin "setup-ssh" (builtins.replaceStrings [ "gh " ] [ "${gh}/bin/gh " ] (builtins.readFile ./setup-ssh.sh))
+7 -7
View File
@@ -2,14 +2,14 @@
name: vars: template:
(stdenv.mkDerivation {
inherit name;
inherit name;
passAsFile = [ "varsData" ];
varsData = builtins.toJSON vars;
passAsFile = [ "varsData" ];
varsData = builtins.toJSON vars;
nativeBuildInputs = [ jinja2-cli ];
phases = [ "buildPhase" "installPhase" ];
nativeBuildInputs = [ jinja2-cli ];
phases = [ "buildPhase" "installPhase" ];
buildPhase = ''${jinja2-cli}/bin/jinja2 --format=json ${template} $varsDataPath > result'';
installPhase = "cp result $out";
buildPhase = ''${jinja2-cli}/bin/jinja2 --format=json ${template} $varsDataPath > result'';
installPhase = "cp result $out";
})
+17 -16
View File
@@ -1,24 +1,25 @@
{ postgresql_15, postgresql_16, writeScriptBin, ... }:
let
newPostgres = postgresql_16;
oldPostgres = postgresql_15;
in writeScriptBin "upgrade-pg-cluster" ''
set -eux
systemctl stop postgresql
newPostgres = postgresql_16;
oldPostgres = postgresql_15;
in
writeScriptBin "upgrade-pg-cluster" ''
set -eux
systemctl stop postgresql
export NEWDATA="/var/lib/postgresql/${newPostgres.psqlSchema}"
export NEWBIN="${newPostgres}/bin"
export NEWDATA="/var/lib/postgresql/${newPostgres.psqlSchema}"
export NEWBIN="${newPostgres}/bin"
export OLDDATA="/var/lib/postgresql/${oldPostgres.psqlSchema}"
export OLDBIN="${oldPostgres}/bin"
export OLDDATA="/var/lib/postgresql/${oldPostgres.psqlSchema}"
export OLDBIN="${oldPostgres}/bin"
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
cd "$NEWDATA"
sudo -u postgres "$NEWBIN/initdb" -D "$NEWDATA"
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
cd "$NEWDATA"
sudo -u postgres "$NEWBIN/initdb" -D "$NEWDATA"
sudo -u postgres "$NEWBIN/pg_upgrade" \
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
--old-bindir "$OLDBIN" --new-bindir "$NEWBIN" \
"$@"
sudo -u postgres "$NEWBIN/pg_upgrade" \
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
--old-bindir "$OLDBIN" --new-bindir "$NEWBIN" \
"$@"
''
+24 -24
View File
@@ -1,32 +1,32 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
toPythonModule,
pipenv,
{ lib
, buildPythonPackage
, fetchFromGitHub
, toPythonModule
, pipenv
,
}:
buildPythonPackage rec {
pname = "xonsh-apipenv";
version = "0.5.0";
pname = "xonsh-apipenv";
version = "0.5.0";
src = fetchFromGitHub {
owner = "greg-hellings";
repo = "xontrib-apipenv";
rev = "0.5.0";
hash = "sha256-QJatIiIP1YVT8M5vLUPHmf/8CGZ34cXMBXQmfSgY5C4=";
};
src = fetchFromGitHub {
owner = "greg-hellings";
repo = "xontrib-apipenv";
rev = "0.5.0";
hash = "sha256-QJatIiIP1YVT8M5vLUPHmf/8CGZ34cXMBXQmfSgY5C4=";
};
doCheck = false;
doCheck = false;
dependencies = [
(toPythonModule pipenv)
];
dependencies = [
(toPythonModule pipenv)
];
meta = with lib; {
description = "Auto pipenv support for Xonsh";
homepage = "https://github.com/greg-hellings/xontrib-apipenv";
license = licenses.mit;
maintainers = [];
};
meta = with lib; {
description = "Auto pipenv support for Xonsh";
homepage = "https://github.com/greg-hellings/xontrib-apipenv";
license = licenses.mit;
maintainers = [ ];
};
}