mirror of
https://gerrit.hackerspace.pl/hscloud
synced 2025-02-16 08:47:07 +00:00
This is needed to use hscloud in builds invoked from flakes. Change-Id: I7551b97dfeedb9399866cd2c16cc573ee60359cc Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1452 Reviewed-by: q3k <q3k@hackerspace.pl>
39 lines
975 B
Nix
39 lines
975 B
Nix
{ system ? builtins.currentSystem, ... }@args:
|
|
|
|
with builtins;
|
|
|
|
let
|
|
fix = f: let x = f x; in x;
|
|
|
|
readTree = import ./nix/readtree {};
|
|
|
|
# Tracking nixos-unstable as of 2021-08-11.
|
|
nixpkgsCommit = "42aae6fa748a41ced37373fc6d914de512658178";
|
|
nixpkgsSrc = fetchTarball {
|
|
url = "https://github.com/NixOS/nixpkgs/archive/${nixpkgsCommit}.tar.gz";
|
|
sha256 = "I7oAGC1Ldm5kcryUQxLubMmMCj5o0n+JSLVGRCL0wm8=";
|
|
};
|
|
nixpkgs = import nixpkgsSrc {
|
|
config.allowUnfree = true;
|
|
config.allowBroken = true;
|
|
|
|
# Nixpkgs marked this package as insecure.
|
|
# We need it for HTML-to-PDF conversion.
|
|
config.permittedInsecurePackages = [
|
|
"qtwebkit-5.212.0-alpha4"
|
|
];
|
|
inherit system;
|
|
};
|
|
|
|
resForPkgs = pkgs: fix (self: (readTree rec {
|
|
hscloud = self;
|
|
inherit pkgs;
|
|
pkgsSrc = pkgs.path;
|
|
inherit (pkgs) lib stdenv;
|
|
hscloudForPkgs = pkgs: resForPkgs pkgs;
|
|
} ./.));
|
|
|
|
in (resForPkgs nixpkgs) // {
|
|
root = ./.;
|
|
pkgs = nixpkgs;
|
|
}
|