Skip to content

Commit

Permalink
Make nixexprs work with latest nixexprs-lib changes
Browse files Browse the repository at this point in the history
  • Loading branch information
infinisil committed Oct 28, 2020
1 parent 8119a34 commit eeca6c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 38 deletions.
41 changes: 4 additions & 37 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,41 +1,8 @@
let
nixexprsLib = import <nixexprs-lib> {};
let nixexprsLib = import <nixexprs-lib>;
in nixexprsLib.channel {
# The name of this channel, so it's available at eval time
name = "infinisil";
name = "limeytexan";

# Allows specifying nixpkgs overlays
nixpkgsOverlays = [
# Override ncurses of all nixpkgs derivations to use our own
(self: super: {
# flox.self points to our own channel
ncurses = super.flox.self.ncurses;
})
];

# Specifies channel dependencies
inputChannels = [ "chan1" "chan2" ];

# Specifies a dependency on the chan1 and chan2 channels
# This function is called with the resolved
outputsOverlays = [
# nixexprsLib has functions for auto-calling directories
(nixexprsLib.auto.python ./pythonPackages)
(nixexprsLib.auto.perl ./perlPackages)

# But users can also define packages directly
(self: super: {
# To avoid namespace-clashes, all flox attributes are under flox.*
foo = self.flox.builders.mkDerivation {
# Sets src to foo's source
project = "foo";

# Other channels accessible through flox.channels.*
buildInputs = [ self.flox.channels.chan1.foolib ];
};

# Example of importing a Nix expression from the project source
bar = import (self.flox.source "bar" {}) {};
})
outputOverlays = [
(nixexprsLib.auto.pkgs ./pkgs)
];
}
2 changes: 1 addition & 1 deletion pkgs/ptree/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ flox, psmisc }:

flox.mkDerivation {
flox.builders.mkDerivation {
project = "ptree";
buildInputs = [ psmisc ];
}

0 comments on commit eeca6c4

Please sign in to comment.