Snippets

profile://github.com/delan How to play with a Nix derivation outside nixpkgs

Created by Delan Azabani
# usage: nix-build | nix-shell
# https://sandervanderburg.blogspot.com/2014/07/managing-private-nix-packages-outside.html
{ system ? builtins.currentSystem }:
let
  pkgs = import <nixpkgs> { inherit system; };
  callPackage = pkgs.lib.callPackageWith (pkgs // self);
  self = {
    bore = callPackage ./bore.nix {};
  };
in self

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.