Use conventional Nix formatting

Also always end comments with a full stop, and bump package versions.
This commit is contained in:
Reinout Meliesie 2026-04-29 16:09:15 +02:00
commit 99885b2be2
Signed by: zedfrigg
GPG key ID: 3AFCC06481308BC6
4 changed files with 36 additions and 36 deletions

View file

@ -1,21 +1,21 @@
{ pkgs , ... } : { pkgs, ... }:
with pkgs ; with pkgs;
{ {
nixpkgs = { nixpkgs = {
overlays = [ overlays = [
( self : super : { ( self: super: {
journalctl-last-invocation = callPackage ( journalctl-last-invocation = callPackage (
import packages/journalctl-last-invocation/package.nix import packages/journalctl-last-invocation/package.nix
) {} ; ) {};
nix-store-fuzzy-find = callPackage ( nix-store-fuzzy-find = callPackage (
import packages/nix-store-fuzzy-find/package.nix import packages/nix-store-fuzzy-find/package.nix
) {} ; ) {};
} ) })
] ; ];
} ; };
} }

View file

@ -1,24 +1,24 @@
{ pkgs , stdenv } : { pkgs, stdenv }:
with pkgs ; with pkgs;
with stdenv ; with stdenv;
mkDerivation { mkDerivation {
pname = "journalctl-last-invocation" ; pname = "journalctl-last-invocation";
version = "2025-03-10" ; version = "2026-04-29";
phases = [ "createSourcesPhase" "installPhase" ] ; phases = [ "createSourcesPhase" "installPhase" ];
createSourcesPhase = '' createSourcesPhase = ''
# Same directory structure that `unpackPhase` would use # Same directory structure that `unpackPhase` would use.
mkdir -p /build/source mkdir -p /build/source
cat <<- EOF > /build/source/journalctl-last-invocation cat <<- EOF > /build/source/journalctl-last-invocation
#!${bash}/bin/sh #!${bash}/bin/sh
exec ${systemd}/bin/journalctl _SYSTEMD_INVOCATION_ID=\$( ${systemd}/bin/systemctl show --value --property=InvocationID \$1 ) exec ${systemd}/bin/journalctl _SYSTEMD_INVOCATION_ID=\$(${systemd}/bin/systemctl show --value --property=InvocationID \$1)
EOF EOF
'' ; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
@ -26,5 +26,5 @@ mkDerivation {
cp /build/source/journalctl-last-invocation $out/bin/ cp /build/source/journalctl-last-invocation $out/bin/
chmod +x $out/bin/journalctl-last-invocation chmod +x $out/bin/journalctl-last-invocation
'' ; '';
} }

View file

@ -1,16 +1,16 @@
{ pkgs , stdenv } : { pkgs, stdenv }:
with pkgs ; with pkgs;
with stdenv ; with stdenv;
mkDerivation { mkDerivation {
pname = "nix-store-fuzzy-find" ; pname = "nix-store-fuzzy-find";
version = "2025-03-09" ; version = "2026-04-29";
phases = [ "createSourcesPhase" "installPhase" ] ; phases = [ "createSourcesPhase" "installPhase" ];
createSourcesPhase = '' createSourcesPhase = ''
# Same directory structure that `unpackPhase` would use # Same directory structure that `unpackPhase` would use.
mkdir -p /build/source mkdir -p /build/source
cat <<- EOF > /build/source/nix-store-fuzzy-find cat <<- EOF > /build/source/nix-store-fuzzy-find
@ -18,7 +18,7 @@ mkDerivation {
exec ${findutils}/bin/find /nix/store -maxdepth 1 -type d -name "*-\$1-*" exec ${findutils}/bin/find /nix/store -maxdepth 1 -type d -name "*-\$1-*"
EOF EOF
'' ; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
@ -26,5 +26,5 @@ mkDerivation {
cp /build/source/nix-store-fuzzy-find $out/bin/ cp /build/source/nix-store-fuzzy-find $out/bin/
chmod +x $out/bin/nix-store-fuzzy-find chmod +x $out/bin/nix-store-fuzzy-find
'' ; '';
} }

View file

@ -32,18 +32,18 @@ Using the top-level NixOS module:
```nix ```nix
imports = [ imports = [
( fetchTarball { (fetchTarball {
url = "https://kernelmaft.com/forgejo/zedfrigg/nix-packages/archive/f91196c8a4a3ba6953c85b94ea75dee5e331548f.tar.gz" ; url = "https://kernelmaft.com/forgejo/zedfrigg/nix-packages/archive/f91196c8a4a3ba6953c85b94ea75dee5e331548f.tar.gz";
sha256 = "sha256:1wx7ljabgndandcd11jmr590jfpkhs55mqrgksf24ji90m37wpq0" ; sha256 = "sha256:1wx7ljabgndandcd11jmr590jfpkhs55mqrgksf24ji90m37wpq0";
} + "/nixos-module.nix" ) } + "/nixos-module.nix")
] ; ];
``` ```
Using a specific package expression: Using a specific package expression:
```nix ```nix
pkgs . callPackage ( import ( pkgs . fetchurl { pkgs.callPackage (import (pkgs.fetchurl {
url = "https://kernelmaft.com/forgejo/zedfrigg/nix-packages/raw/commit/c45884c66f31f8d8d80866bebc13e9e963e02a70/packages/python3.11-django-imagekit/package.nix" ; url = "https://kernelmaft.com/forgejo/zedfrigg/nix-packages/raw/commit/c45884c66f31f8d8d80866bebc13e9e963e02a70/packages/python3.11-django-imagekit/package.nix";
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" ; hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
} ) ) {} })) {}
``` ```