Skip to content

Commit a328420

Browse files
chore: nix exposes default.nix
1 parent c5d71f3 commit a328420

File tree

5 files changed

+134
-37
lines changed

5 files changed

+134
-37
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ I use Unix-based systems on a daily basis, so I am not able to test each build a
9090
### Nix
9191

9292
```bash
93-
nix profile install 'github:cristianoliveira/nixpkgs#ergoProxy'
93+
nix profile install 'github:cristianoliveira/ergo'
9494
```
9595
More examples see: https://github.com/cristianoliveira/nixpkgs
9696

default.nix

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{ pkgs ? import <nixpkgs> {} }:
2+
{
3+
default = pkgs.callPackage ./nix/package.nix { inherit pkgs; };
4+
nightly = pkgs.callPackage ./nix/package-nightly.nix {
5+
inherit pkgs;
6+
};
7+
}

flake.lock

+115-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+9-20
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,24 @@
33
inputs = {
44
nixpkgs.url = "github:NixOS/nixpkgs";
55
utils.url = "github:numtide/flake-utils";
6-
conixpkgs.url = "github:cristianoliveira/nixpkgs";
6+
conixpkgs = {
7+
url = "github:cristianoliveira/nixpkgs";
8+
flake = true;
9+
};
710
};
811
outputs = { self, nixpkgs, utils, conixpkgs }:
912
utils.lib.eachDefaultSystem (system:
1013
let
11-
pkgs = import nixpkgs {
12-
inherit system;
13-
# Inject the namespace copkgs into the package set
14-
overlays = [
15-
(_: prev: {
16-
copkgs = {
17-
funzzy = conixpkgs.packages."${system}".funzzyNightly;
18-
ergoProxy = pkgs.callPackage ./nix/package.nix { inherit pkgs; };
19-
ergoProxyNigthly = pkgs.callPackage ./nix/package-nightly.nix {
20-
inherit pkgs;
21-
};
22-
};
23-
}
24-
)
25-
];
26-
};
14+
pkgs = import nixpkgs { inherit system; };
15+
copkgs = import conixpkgs { inherit pkgs; };
2716
in {
2817
devShells.default = import ./nix/dev-env.nix {
2918
inherit pkgs;
19+
inherit copkgs;
3020
};
3121

32-
packages = {
33-
ergoProxy = pkgs.copkgs.ergoProxy;
34-
ergoProxyNigthly = pkgs.copkgs.ergoProxyNigthly;
22+
packages = pkgs.callPackage ./default.nix {
23+
inherit pkgs;
3524
};
3625
});
3726
}

nix/dev-env.nix

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
{ pkgs ? import <nixpkgs> {} }:
1+
{ pkgs ? import <nixpkgs> {}, copkgs }:
22
pkgs.mkShell {
33
# buildInputs is for dependencies you'd need "at run time",
44
# were you to to use nix-build not nix-shell and build whatever you were working on
55
buildInputs = [
66
pkgs.go
7-
pkgs.copkgs.ergoProxy
8-
pkgs.copkgs.funzzy
7+
copkgs.funzzy
98
];
109

1110
shell = pkgs.zsh;

0 commit comments

Comments
 (0)