blob: 787bdf96bb63d6248a77f0c01f5b886793eb33ce [file] [log] [blame]
vuko98369992022-12-20 00:48:28 +01001{ system ? builtins.currentSystem, ... }@args:
Serge Bazanski2efb6982020-10-03 00:13:45 +02002
3with builtins;
4
5let
6 fix = f: let x = f x; in x;
7
Bartosz Stebel56ff18c2021-08-30 23:28:45 +02008 readTree = import ./nix/readtree {};
Serge Bazanski2efb6982020-10-03 00:13:45 +02009
Serge Bazanski97b5cd72023-07-28 17:14:50 +000010 # Tracking nixos-unstable as of 2023-07-24.
11 nixpkgsCommit = "e6b1f2f22b28851d5515eb53d8d5e905aabdad46";
Serge Bazanski2efb6982020-10-03 00:13:45 +020012 nixpkgsSrc = fetchTarball {
Serge Bazanski225a5c72021-02-13 13:15:57 +010013 url = "https://github.com/NixOS/nixpkgs/archive/${nixpkgsCommit}.tar.gz";
Serge Bazanski97b5cd72023-07-28 17:14:50 +000014 sha256 = "sha256:0jwwndkdfrv8cfcv47ir1k05gqqxhpi3jkv3dsyflv0wy3pl98g2";
Serge Bazanski2efb6982020-10-03 00:13:45 +020015 };
16 nixpkgs = import nixpkgsSrc {
17 config.allowUnfree = true;
18 config.allowBroken = true;
Patryk Jakuszew28742b82022-11-26 21:33:38 +010019
20 # Nixpkgs marked this package as insecure.
21 # We need it for HTML-to-PDF conversion.
22 config.permittedInsecurePackages = [
23 "qtwebkit-5.212.0-alpha4"
24 ];
vuko98369992022-12-20 00:48:28 +010025 inherit system;
Serge Bazanski2efb6982020-10-03 00:13:45 +020026 };
27
Serge Bazanskic35ea6a2022-07-07 17:47:58 +020028 resForPkgs = pkgs: fix (self: (readTree rec {
29 hscloud = self;
30 inherit pkgs;
31 pkgsSrc = pkgs.path;
32 inherit (pkgs) lib stdenv;
33 hscloudForPkgs = pkgs: resForPkgs pkgs;
34 } ./.));
35
36in (resForPkgs nixpkgs) // {
Bartosz Stebel56ff18c2021-08-30 23:28:45 +020037 root = ./.;
Serge Bazanski2efb6982020-10-03 00:13:45 +020038 pkgs = nixpkgs;
Serge Bazanskic35ea6a2022-07-07 17:47:58 +020039}