From 18b6f21f1203384697e032add53d7f174920e912 Mon Sep 17 00:00:00 2001 From: Reinout Meliesie Date: Mon, 3 Mar 2025 12:58:02 +0100 Subject: [PATCH 1/2] Add TODO about buildPythonPackage to NixOS overlay --- nixos-overlay.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos-overlay.nix b/nixos-overlay.nix index 818af86..2cfe91a 100644 --- a/nixos-overlay.nix +++ b/nixos-overlay.nix @@ -31,6 +31,15 @@ } ; } ; + + # TODO: Use the following template once the custom Python packages have been converted to use `buildPythonPackage` + # + # python311 = super . python311 . override { + # packageOverrides = python-self : python-super : { + # package-name = super . callPackage ( import ./package-file.nix ) {} ; + # } ; + # } ; + } ) ] ; } ; From 1ba70cebc4aab98e371b5fd986e210ad810e3f01 Mon Sep 17 00:00:00 2001 From: Reinout Meliesie Date: Mon, 3 Mar 2025 12:58:27 +0100 Subject: [PATCH 2/2] Add examples to readme --- readme.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/readme.md b/readme.md index 56f959d..6104221 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,37 @@ # Nix Packages An assortment of Nix packages not in the official collection. +They can either be imported individually or using the overlay if you're on NixOS. These are purposefully written without support for [overriding](https://nixos.org/guides/nix-pills/17-nixpkgs-overriding-packages) in order to minimise complexity. If you want to build upon them I encourage you to fork this repository. + +--- + +Example for using a specific package: + +```nix + +pkgs . callPackage ( import ( pkgs . fetchurl { + url = "https://kernelmaft.com/forgejo/zedfrigg/nix-packages/raw/commit/c45884c66f31f8d8d80866bebc13e9e963e02a70/python3.11-django-imagekit.nix" ; + hash = "sha256-E4mo2JvK5SuxC6SQ7O5ZjhzehmxEThNJ7F6gBnil8ho=" ; +} ) ) {} + +``` + +Example for using the NixOS overlay: + +```nix + +imports = [ + ( fetchTarball { + url = "https://kernelmaft.com/forgejo/Zedfrigg/nix-packages/archive/432123bb0984dd766c16ac06b7e3ef4cfee36145.tar.gz" ; + sha256 = "sha256:1wx7ljabgndandcd11jmr590jfpkhs55mqrgksf24ji90m37wpq0" ; + } + "/nixos-overlay.nix" ) +] ; + +``` + +> **Note:** +> You should replace the commits here with the latest one, or whichever one you want to use. +> The hashes will of course differ.