Skip to content

Instantly share code, notes, and snippets.

@coderofsalvation
Last active January 6, 2024 09:58
Show Gist options
  • Save coderofsalvation/ff8922e6fc9d9b45f856643d40434832 to your computer and use it in GitHub Desktop.
Save coderofsalvation/ff8922e6fc9d9b45f856643d40434832 to your computer and use it in GitHub Desktop.
nix create/tweak a package cheatsheet

Update a sha256/Hash

$ nix store prefetch-file <url>                                                                                        

build a derivation

  1. get default.nix from nixpkgs master-repo
  2. run the command below
NIXPKGS_ALLOW_UNFREE=1 nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'

update maintainers

find githubId: https://api.github.com/users/yourusername

lint before submitting a package

$ nix-shell -p nixpkgs-lint --run nixpkgs-lint <yourpkg.nix>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment