diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 5ace460..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 082873a..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -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 {}).lib.version' - - name: Setup cachix - uses: cachix/cachix-action@v15 - # Don't replace here! - if: ${{ matrix.cachixName != '' }} - 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 '' nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs - - name: Trigger NUR update - # Don't replace here! - if: ${{ matrix.nurRepo != '' }} - run: curl -XPOST "https://nur-update.nix-community.org/update?repo=${{ matrix.nurRepo }}" diff --git a/ci.nix b/ci.nix deleted file mode 100644 index 22b1352..0000000 --- a/ci.nix +++ /dev/null @@ -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 { } }: - -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; -} diff --git a/default.nix b/default.nix index c47929a..e287af0 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,6 @@ { pkgs ? import { } }: { - 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 { }; } diff --git a/flake.lock b/flake.lock index 78cf35d..ad56595 100644 --- a/flake.lock +++ b/flake.lock @@ -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" } diff --git a/flake.nix b/flake.nix index 81a143f..f3bb530 100644 --- a/flake.nix +++ b/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; }; + }; }; } diff --git a/overlay.nix b/overlay.nix deleted file mode 100644 index bff7396..0000000 --- a/overlay.nix +++ /dev/null @@ -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))) diff --git a/pkgs/digital-a-love-story/default.nix b/packages/digital-a-love-story/default.nix similarity index 97% rename from pkgs/digital-a-love-story/default.nix rename to packages/digital-a-love-story/default.nix index bf7e06b..657317e 100644 --- a/pkgs/digital-a-love-story/default.nix +++ b/packages/digital-a-love-story/default.nix @@ -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"; }; } diff --git a/pkgs/digital-a-love-story/digital.desktop b/packages/digital-a-love-story/digital.desktop similarity index 100% rename from pkgs/digital-a-love-story/digital.desktop rename to packages/digital-a-love-story/digital.desktop diff --git a/pkgs/digital-a-love-story/launcher.sh b/packages/digital-a-love-story/launcher.sh similarity index 100% rename from pkgs/digital-a-love-story/launcher.sh rename to packages/digital-a-love-story/launcher.sh diff --git a/pkgs/dont-take-it-personally-babe/default.nix b/packages/dont-take-it-personally-babe/default.nix similarity index 96% rename from pkgs/dont-take-it-personally-babe/default.nix rename to packages/dont-take-it-personally-babe/default.nix index 570ebe0..ad0d11b 100644 --- a/pkgs/dont-take-it-personally-babe/default.nix +++ b/packages/dont-take-it-personally-babe/default.nix @@ -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"; }; } diff --git a/pkgs/dont-take-it-personally-babe/donttakeitpersonallybabeitjustaintyourstory.desktop b/packages/dont-take-it-personally-babe/donttakeitpersonallybabeitjustaintyourstory.desktop similarity index 100% rename from pkgs/dont-take-it-personally-babe/donttakeitpersonallybabeitjustaintyourstory.desktop rename to packages/dont-take-it-personally-babe/donttakeitpersonallybabeitjustaintyourstory.desktop diff --git a/pkgs/dont-take-it-personally-babe/launcher.sh b/packages/dont-take-it-personally-babe/launcher.sh similarity index 100% rename from pkgs/dont-take-it-personally-babe/launcher.sh rename to packages/dont-take-it-personally-babe/launcher.sh