Disclamer: it probably is not the Nix/NixOS way
This repository is a "nix overlay" that you might want to use to add extra derivations/packages to your system. It will enable you to quickly add more derivations to your system.
Heavily inspired from the following tutorials/blogs:
- https://nix-tutorial.gitlabpages.inria.fr/nix-tutorial/experiment-packaging.html
- https://github.com/mrVanDalo/nix-overlay
All that is needed it to declare the overlay
# run from the root of this repository
mkdir -p ~/.config/nixpkgs/overlays
ln -s $PWD ~/.config/nixpkgs/overlays/mynixpkgs
Then you can run nix-shell with the overlay packages:
nix-shell -p podman_compose
Go to the package directory and run the command that is at the default.nix file in the root of this repository. For example, in order to build podman_compose:
cd pkgs/podman_compose
nix-build -E 'with import <nixpkgs> {} ; python3Packages.callPackage ./default.nix {}'
In the /etc/nixos/configuration.nix:
# ellipsis are just text I omitted
...
let
nixpkgs-tcheneau = import (fetchGit { url = "https://github.com/tcheneau/mynixpkgs"; ref = "master"; });
in
{
nixpkgs.overlays = [
nixpkgs-tcheneau
];
environment.systemPackages = [
...
pkgs.podman_compose
...
];
...
}
I am amazed at how HARD it was to actually get down to these few instructions.