Skip to content

Commit

Permalink
feat: upgrade nixpkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
jakehamilton committed Nov 10, 2023
1 parent 255be08 commit d256089
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 57 deletions.
39 changes: 12 additions & 27 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 7 additions & 30 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
description = "Snowfall Cowsay";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# NOTE: ttyd had a bug on 23.05 that caused whitespace characters
# to not receive colors which broke cow2img. Currently, unstable
# is required in order to function properly.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

snowfall-lib = {
url = "github:snowfallorg/lib";
url = "github:snowfallorg/lib?ref=v2.1.1";
inputs.nixpkgs.follows = "nixpkgs";
};

vhs = {
url = "github:snowfallorg/vhs";
url = "github:snowfallorg/vhs?ref=v1.0.0";
inputs.nixpkgs.follows = "nixpkgs";
};

Expand All @@ -22,33 +24,8 @@
};

outputs = inputs:
let
inherit (inputs.nixpkgs) lib;
inherit (lib) mapAttrsToList flatten foldl pipe;

collect-packages =
(system: packages:
mapAttrsToList
(name: package: {
inherit system name package;
})
packages
);

collected-packages = flatten (
mapAttrsToList collect-packages inputs.self.packages
);

create-jobs = jobs: entry: jobs // {
${entry.name} = (jobs.${entry.name} or { }) // {
${entry.system} = entry.package;
};
};

hydraJobs = foldl create-jobs { } collected-packages;
in
inputs.snowfall-lib.mkFlake {
inherit inputs hydraJobs;
inherit inputs;

src = ./.;

Expand Down

0 comments on commit d256089

Please sign in to comment.