Skip to content

Instantly share code, notes, and snippets.

Created November 22, 2017 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2abcd7dc9256dd26c908bc2c10c5e52e to your computer and use it in GitHub Desktop.
Save anonymous/2abcd7dc9256dd26c908bc2c10c5e52e to your computer and use it in GitHub Desktop.
How far I got trying to follow the instructions on [http://sandervanderburg.blogspot.de/2014/07/managing-private-nix-packages-outside.html]. Works, but what doesnt work is referring to my custom package set from within configuration.nix (see configuration.nix line 14). Double hyphens in filenames represent the folder hierarchy.
{ config, lib, pkgs, ... }:
{
nix.nixPath = [
"repo=/path/to/repo/default.nix"
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs" # Default
"nixos-config=/etc/nixos/configuration.nix" # Default
"/nix/var/nix/profiles/per-user/root/channels" # Default
];
nixpkgs.config.packageOverrides = pkgs: {
custom = import <repo> {};
};
environment.systemPackages = with pkgs; [
custom.nvramtool # this is what doesn't work
[…]
];
[…]
{ system ? builtins.currentSystem }:
let
pkgs = import <nixpkgs> { inherit system; };
callPackage = pkgs.lib.callPackageWith (pkgs // self);
self = {
nvramtool = callPackage ./pkgs/nvramtool { };
[…]
};
in
self
{ stdenv, fetchgit, iasl, flex, bison }:
stdenv.mkDerivation rec {
name = "nvramtool-${version}";
[…]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment