mirror of https://github.com/materusPL/Nixerus.git
Remove all files for mock flake
This commit is contained in:
parent
97fd90c347
commit
733ddc9f68
22
LICENSE
22
LICENSE
|
@ -1,22 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2018 Francesco Gazzetta
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
37
README.md
37
README.md
|
@ -1,37 +0,0 @@
|
|||
# nur-packages-template
|
||||
|
||||
**A template for [NUR](https://github.com/nix-community/NUR) repositories**
|
||||
|
||||
## Setup
|
||||
|
||||
1. Click on [Use this template](https://github.com/nix-community/nur-packages-template/generate) to start a repo based on this template. (Do _not_ fork it.)
|
||||
2. Add your packages to the [pkgs](./pkgs) directory and to
|
||||
[default.nix](./default.nix)
|
||||
* Remember to mark the broken packages as `broken = true;` in the `meta`
|
||||
attribute, or travis (and consequently caching) will fail!
|
||||
* Library functions, modules and overlays go in the respective directories
|
||||
3. Choose your CI: Depending on your preference you can use github actions (recommended) or [Travis ci](https://travis-ci.com).
|
||||
- Github actions: Change your NUR repo name and optionally add a cachix name in [.github/workflows/build.yml](./.github/workflows/build.yml) and change the cron timer
|
||||
to a random value as described in the file
|
||||
- Travis ci: Change your NUR repo name and optionally your cachix repo name in
|
||||
[.travis.yml](./.travis.yml). Than enable travis in your repo. You can add a cron job in the repository settings on travis to keep your cachix cache fresh
|
||||
5. Change your travis and cachix names on the README template section and delete
|
||||
the rest
|
||||
6. [Add yourself to NUR](https://github.com/nix-community/NUR#how-to-add-your-own-repository)
|
||||
|
||||
## README template
|
||||
|
||||
# nur-packages
|
||||
|
||||
**My personal [NUR](https://github.com/nix-community/NUR) repository**
|
||||
|
||||
<!-- Remove this if you don't use github actions -->
|
||||
![Build and populate cache](https://github.com/<YOUR-GITHUB-USER>/nur-packages/workflows/Build%20and%20populate%20cache/badge.svg)
|
||||
|
||||
<!--
|
||||
Uncomment this if you use travis:
|
||||
|
||||
[![Build Status](https://travis-ci.com/<YOUR_TRAVIS_USERNAME>/nur-packages.svg?branch=master)](https://travis-ci.com/<YOUR_TRAVIS_USERNAME>/nur-packages)
|
||||
-->
|
||||
[![Cachix Cache](https://img.shields.io/badge/cachix-<YOUR_CACHIX_CACHE_NAME>-blue.svg)](https://<YOUR_CACHIX_CACHE_NAME>.cachix.org)
|
||||
|
53
ci.nix
53
ci.nix
|
@ -1,53 +0,0 @@
|
|||
# This file provides all the buildable and cacheable packages and
|
||||
# package outputs in your package set. These are what gets built by CI,
|
||||
# so if you correctly mark packages as
|
||||
#
|
||||
# - broken (using `meta.broken`),
|
||||
# - unfree (using `meta.license.free`), and
|
||||
# - locally built (using `preferLocalBuild`)
|
||||
#
|
||||
# then your CI will be able to build and cache only those packages for
|
||||
# which this is possible.
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
with builtins;
|
||||
let
|
||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||
isDerivation = p: isAttrs p && p ? type && p.type == "derivation";
|
||||
isBuildable = p: !(p.meta.broken or false) && p.meta.license.free or true;
|
||||
isCacheable = p: !(p.preferLocalBuild or false);
|
||||
shouldRecurseForDerivations = p: isAttrs p && p.recurseForDerivations or false;
|
||||
|
||||
nameValuePair = n: v: { name = n; value = v; };
|
||||
|
||||
concatMap = builtins.concatMap or (f: xs: concatLists (map f xs));
|
||||
|
||||
flattenPkgs = s:
|
||||
let
|
||||
f = p:
|
||||
if shouldRecurseForDerivations p then flattenPkgs p
|
||||
else if isDerivation p then [ p ]
|
||||
else [ ];
|
||||
in
|
||||
concatMap f (attrValues s);
|
||||
|
||||
outputsOf = p: map (o: p.${o}) p.outputs;
|
||||
|
||||
nurAttrs = import ./default.nix { inherit pkgs; };
|
||||
|
||||
nurPkgs =
|
||||
flattenPkgs
|
||||
(listToAttrs
|
||||
(map (n: nameValuePair n nurAttrs.${n})
|
||||
(filter (n: !isReserved n)
|
||||
(attrNames nurAttrs))));
|
||||
|
||||
in
|
||||
rec {
|
||||
buildPkgs = filter isBuildable nurPkgs;
|
||||
cachePkgs = filter isCacheable buildPkgs;
|
||||
|
||||
buildOutputs = concatMap outputsOf buildPkgs;
|
||||
cacheOutputs = concatMap outputsOf cachePkgs;
|
||||
}
|
20
default.nix
20
default.nix
|
@ -1,20 +0,0 @@
|
|||
# This file describes your repository contents.
|
||||
# It should return a set of nix derivations
|
||||
# and optionally the special attributes `lib`, `modules` and `overlays`.
|
||||
# It should NOT import <nixpkgs>. Instead, you should take pkgs as an argument.
|
||||
# Having pkgs default to <nixpkgs> is fine though, and it lets you use short
|
||||
# commands such as:
|
||||
# nix-build -A mypackage
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
{
|
||||
# The `lib`, `modules`, and `overlay` names are special
|
||||
lib = import ./lib { inherit pkgs; }; # functions
|
||||
modules = import ./modules; # NixOS modules
|
||||
overlays = import ./overlays; # nixpkgs overlays
|
||||
|
||||
example-package = pkgs.callPackage ./pkgs/example-package { };
|
||||
# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
|
||||
# ...
|
||||
}
|
27
flake.lock
27
flake.lock
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1624561540,
|
||||
"narHash": "sha256-izJ2PYZMGMsSkg+e7c9A1x3t/yOLT+qzUM6WQsc2tqo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c6a049a3d32293b24c0f894a840872cf67fd7c11",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
21
flake.nix
21
flake.nix
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
description = "My personal NUR repository";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"armv6l-linux"
|
||||
"armv7l-linux"
|
||||
];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system: import ./default.nix {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs }:
|
||||
|
||||
with pkgs.lib; {
|
||||
# Add your library functions here
|
||||
#
|
||||
# hexint = x: hexvals.${toLower x};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
# Add your NixOS modules here
|
||||
#
|
||||
# my-module = ./my-module;
|
||||
}
|
15
overlay.nix
15
overlay.nix
|
@ -1,15 +0,0 @@
|
|||
# You can use this file as a nixpkgs overlay. This is useful in the
|
||||
# case where you don't want to add the whole NUR namespace to your
|
||||
# configuration.
|
||||
|
||||
self: super:
|
||||
let
|
||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||
nameValuePair = n: v: { name = n; value = v; };
|
||||
nurAttrs = import ./default.nix { pkgs = super; };
|
||||
|
||||
in
|
||||
builtins.listToAttrs
|
||||
(map (n: nameValuePair n nurAttrs.${n})
|
||||
(builtins.filter (n: !isReserved n)
|
||||
(builtins.attrNames nurAttrs)))
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
# Add your overlays here
|
||||
#
|
||||
# my-overlay = import ./my-overlay;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "example-package-${version}";
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
buildPhase = "echo echo Hello World > example";
|
||||
installPhase = "install -Dm755 example $out";
|
||||
}
|
Loading…
Reference in New Issue