-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
37 lines (30 loc) · 1.16 KB
/
flake.nix
File metadata and controls
37 lines (30 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
description = "HyperWalker: A hypertext grabber...";
# Nixpkgs / NixOS version to use.
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
inherit (nixpkgs) lib;
# to work with older version of flakes
lastModifiedDate =
self.lastModifiedDate or self.lastModified or "19700101";
# Generate a user-friendly version number.
version = builtins.substring 0 8 lastModifiedDate;
in {
overlay.default = final: prev: {
hyperwalker = prev.callPackage ./hyperwalker.nix { inherit version; };
};
# Provide some binary packages for selected system types.
packages = lib.attrsets.mapAttrs (_: pkgs: {
hyperwalker = pkgs.callPackage ./hyperwalker.nix { inherit version; };
}) {
inherit (nixpkgs.legacyPackages)
x86_64-linux x86_64-darwin aarch64-linux aarch64-darwin;
};
# The default package for 'nix build'. This makes sense if the
# flake provides only one package or there is a clear "main"
# package.
defaultPackage =
lib.attrsets.mapAttrs (_: builtins.getAttr "hyperwalker") self.packages;
};
}