change to focus repo on games packages
This commit is contained in:
parent
6d9b5080a2
commit
625756711e
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
|
@ -1,6 +0,0 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
58
.github/workflows/build.yml
vendored
58
.github/workflows/build.yml
vendored
|
@ -1,58 +0,0 @@
|
|||
name: "Build and populate cache"
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
schedule:
|
||||
# rebuild everyday at 1:15
|
||||
- cron: '05 1 * * *'
|
||||
jobs:
|
||||
tests:
|
||||
strategy:
|
||||
matrix:
|
||||
nurRepo:
|
||||
- qenya
|
||||
cachixName:
|
||||
- qenya
|
||||
nixPath:
|
||||
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz
|
||||
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-unstable.tar.gz
|
||||
- nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-24.05.tar.gz
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install nix
|
||||
uses: cachix/install-nix-action@V27
|
||||
with:
|
||||
nix_path: "${{ matrix.nixPath }}"
|
||||
extra_nix_config: |
|
||||
experimental-features = nix-command flakes
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Show nixpkgs version
|
||||
run: nix-instantiate --eval -E '(import <nixpkgs> {}).lib.version'
|
||||
- name: Setup cachix
|
||||
uses: cachix/cachix-action@v15
|
||||
# Don't replace <YOUR_CACHIX_NAME> here!
|
||||
if: ${{ matrix.cachixName != '<YOUR_CACHIX_NAME>' }}
|
||||
with:
|
||||
name: ${{ matrix.cachixName }}
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||
- name: Check evaluation
|
||||
run: |
|
||||
nix-env -f . -qa \* --meta --xml \
|
||||
--allowed-uris https://static.rust-lang.org \
|
||||
--option restrict-eval true \
|
||||
--option allow-import-from-derivation true \
|
||||
--drv-path --show-trace \
|
||||
-I nixpkgs=$(nix-instantiate --find-file nixpkgs) \
|
||||
-I $PWD
|
||||
- name: Build nix packages
|
||||
run: nix shell -f '<nixpkgs>' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs
|
||||
- name: Trigger NUR update
|
||||
# Don't replace <YOUR_REPO_NAME> here!
|
||||
if: ${{ matrix.nurRepo != '<YOUR_REPO_NAME>' }}
|
||||
run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}"
|
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;
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
{
|
||||
digital-a-love-story = pkgs.pkgsi686Linux.callPackage ./pkgs/digital-a-love-story { };
|
||||
dont-take-it-personally-babe = pkgs.pkgsi686Linux.callPackage ./pkgs/dont-take-it-personally-babe { };
|
||||
digital-a-love-story = pkgs.pkgsi686Linux.callPackage ./packages/digital-a-love-story { };
|
||||
dont-take-it-personally-babe = pkgs.pkgsi686Linux.callPackage ./packages/dont-take-it-personally-babe { };
|
||||
}
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1712449641,
|
||||
"narHash": "sha256-U9DDWMexN6o5Td2DznEgguh8TRIUnIl9levmit43GcI=",
|
||||
"lastModified": 1734649271,
|
||||
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "600b15aea1b36eeb43833a50b0e96579147099ff",
|
||||
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
28
flake.nix
28
flake.nix
|
@ -1,22 +1,26 @@
|
|||
{
|
||||
description = "My personal NUR repository";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
description = "Freeware games by Christine Love";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-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);
|
||||
systems = [ "x86_64-linux" "i686-linux" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in
|
||||
{
|
||||
packages = forAllSystems (system: import ./default.nix {
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
});
|
||||
|
||||
legacyPackages = forAllSystems (system: import ./default.nix {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
packages = forAllSystems (system: nixpkgs.lib.filterAttrs (_: v: nixpkgs.lib.isDerivation v) self.legacyPackages.${system});
|
||||
|
||||
overlays.default = final: prev: {
|
||||
scoutshonour = import ./default.nix { pkgs = final; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
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)))
|
|
@ -64,5 +64,6 @@ stdenv.mkDerivation rec {
|
|||
description = "Digital: A Love Story, a freeware game by Christine Love";
|
||||
license = licenses.cc-by-nc-sa-30;
|
||||
platforms = lists.intersectLists platforms.x86 platforms.linux;
|
||||
mainProgram = "digital";
|
||||
};
|
||||
}
|
|
@ -71,5 +71,6 @@ stdenv.mkDerivation rec {
|
|||
description = "don't take it personally, babe, it just ain't your story: a freeware game by Christine Love";
|
||||
license = licenses.cc-by-nc-sa-30;
|
||||
platforms = lists.intersectLists platforms.x86 platforms.linux;
|
||||
mainProgram = "donttakeitpersonallybabeitjustaintyourstory";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue