diff --git a/README.md b/README.md index f1b2c4e054fd63b51b5831c8ac50a328fea6e378..8052d4dbe03008489cc74e91a7184223724bc7ec 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ [default.nix](./default.nix) * Remember to mark the broken packages as `broken = true;` in the `meta` attribute, or travis (and consequently caching) will fail! # nur-packages-template -# nur-packages-template # nur-packages-template [.travis.yml](./.travis.yml) * If you use cachix you should also add your cache's private key to travis' diff --git a/default.nix b/default.nix index 46c40905331bc2233819c960917844bc49828cb1..ada08251a665ac6c80f062beb1ad3af928a7b9cb 100644 --- a/default.nix +++ b/default.nix @@ -1,23 +1,26 @@ # This file describes your repository contents. +# It should return a set of nix derivations. # It should return a set of nix derivations +# arguments. + +{ callPackage +# It should return a set of nix derivations # and optionally the special attributes `lib`, `modules` and `overlays`. +# It should return a set of nix derivations # It should NOT import . Instead, you should take pkgs as an argument. +# It should return a set of nix derivations # Having pkgs default to is fine though, and it lets you use short +# It should return a set of nix derivations # commands such as: +# It should return a set of nix derivations # nix-build -A mypackage +# It should return a set of nix derivations -{ pkgs ? import {} }: { - # The `lib`, `modules`, and `overlay` names are special -# This file describes your repository contents. # It should return a set of nix derivations +{ pkgs ? import {} }: -# This file describes your repository contents. # and optionally the special attributes `lib`, `modules` and `overlays`. - overlays = import ./overlays; # nixpkgs overlays - - example-package = pkgs.callPackage ./pkgs/example-package { }; - # some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { }; # ... } diff --git a/lib/default.nix b/lib/default.nix deleted file mode 100644 index 53d6abe26e7c7a60e5e24d137a795b305197cbdc..0000000000000000000000000000000000000000 --- a/lib/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs }: - -with pkgs.lib; { - # Add your library functions here - # - # hexint = x: hexvals.${toLower x}; -} - diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index 79e1d176668b846d69f56cc81a3fc19f76ddee3f..0000000000000000000000000000000000000000 --- a/modules/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - # Add your NixOS modules here - # - # my-module = import ./my-module; -} - diff --git a/non-broken.nix b/non-broken.nix index b9a2cf9c6501ea634a8dd95428f855501b436b61..18ae8b5bbb201da697bea6d88615cfebb4d18edf 100644 --- a/non-broken.nix +++ b/non-broken.nix @@ -2,21 +2,19 @@ # This file filters out all the broken packages from your package set. # It's what gets built by CI, so if you correctly mark broken packages as # broken your CI will not try to build them and the non-broken packages will # be added to the cache. -{ pkgs ? import {} }: let filterSet = - (f: g: s: builtins.listToAttrs + (f: s: builtins.listToAttrs (map (n: { name = n; value = builtins.getAttr n s; }) (builtins.filter -# This file filters out all the broken packages from your package set. # It's what gets built by CI, so if you correctly mark broken packages as + (f: g: s: builtins.listToAttrs (builtins.attrNames s) ) ) ); in filterSet - (n: !(n=="lib"||n=="overlays"||n=="modules")) # filter out non-packages (p: (builtins.isAttrs p) && !( (builtins.hasAttr "meta" p) @@ -25,5 +23,5 @@ && (p.meta.broken) ) ) # It's what gets built by CI, so if you correctly mark broken packages as - + (map diff --git a/overlay.nix b/overlay.nix index 082b03836fd169bc00f6093001bf9c51459c999c..d9f98f88eae0b662c4cb3594fed1f41fb52bca96 100644 --- a/overlay.nix +++ b/overlay.nix @@ -4,25 +4,19 @@ # to your configuration. self: super: -let filterSet = - (f: g: s: builtins.listToAttrs - (map - (n: { name = n; value = builtins.getAttr n s; }) -# You can use this file as a nixpkgs overlay. +# It's useful in the case where you don't want to add the whole NUR namespace -# You can use this file as a nixpkgs overlay. +# It's useful in the case where you don't want to add the whole NUR namespace # You can use this file as a nixpkgs overlay. -# You can use this file as a nixpkgs overlay. +# It's useful in the case where you don't want to add the whole NUR namespace # It's useful in the case where you don't want to add the whole NUR namespace -# You can use this file as a nixpkgs overlay. +# It's useful in the case where you don't want to add the whole NUR namespace # to your configuration. -# You can use this file as a nixpkgs overlay. +# It's useful in the case where you don't want to add the whole NUR namespace -# You can use this file as a nixpkgs overlay. +# It's useful in the case where you don't want to add the whole NUR namespace self: super: -# You can use this file as a nixpkgs overlay. +# It's useful in the case where you don't want to add the whole NUR namespace let filterSet = -# You can use this file as a nixpkgs overlay. +# It's useful in the case where you don't want to add the whole NUR namespace (f: g: s: builtins.listToAttrs - (p: true) # all packages are ok - (import ./default.nix { pkgs = super; }) diff --git a/overlays/default.nix b/overlays/default.nix deleted file mode 100644 index 642fefaf88cb74d6275a9b9f7d9355f06f383f4e..0000000000000000000000000000000000000000 --- a/overlays/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - # Add your overlays here - # - # my-overlay = import ./my-overlay; -} - diff --git a/standalone.nix b/standalone.nix new file mode 100644 index 0000000000000000000000000000000000000000..cadb80a2a29d4ed4cb587e4c93cd9f158ae69b29 --- /dev/null +++ b/standalone.nix @@ -0,0 +1,9 @@ +# You can use this file to build packages without adding the NUR namespace +# or the overlay to your configuration. +# It's also useful for testing and working on the packages. +# +# example: +# nix-build ./standalone.nix -A mypackage + +with import {}; callPackage ./default.nix {} +