-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
37 lines (36 loc) · 1011 Bytes
/
default.nix
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
{ pkgs ? import <nixpkgs> {}
, tarball_url
, tarball_sha256
, rev ? "master"
}:
let
inherit (builtins) replaceStrings getFlake fetchTarball;
inherit (pkgs) fetchzip;
nixpkgs-path = fetchTarball {
url = tarball_url;
sha256 = tarball_sha256;
};
flake-compat = import (fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/4112a081eff4b4d91d2db383c301780ee3c17b2b.tar.gz";
sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5";
});
flake = flake-compat { src = nixpkgs-path; };
zeal = import ./zeal {
inherit pkgs rev;
nixpkgs-flake = flake;
nixpkgs-path = nixpkgs-path;
};
in pkgs.stdenv.mkDerivation {
name = "docs-${rev}";
dontUnpack = true;
installPhase = ''
mkdir $out
for f in ${flake.defaultNix.htmlDocs.nixpkgsManual}/share/doc/*; do
ln -s "$f" $out/
done
for f in ${flake.defaultNix.htmlDocs.nixosManual}/share/doc/*; do
ln -s "$f" $out/
done
ln -s ${zeal} $out/nixpkgs.docset.tgz
'';
}