diff options
author | Justin Bedo <cu@cua0.org> | 2023-08-03 23:36:14 +1000 |
---|---|---|
committer | Justin Bedo <cu@cua0.org> | 2023-08-03 23:36:14 +1000 |
commit | d7cdea2dd784d5bd5e0acb5766656e77da285049 (patch) | |
tree | ed3ae863a3ab7a0dd56bdb75675f8ab28eb57e5e | |
parent | 04685332602ebcb6c0429026aa1def55f4c8c483 (diff) |
switch to cloudflare zlib
-rw-r--r-- | default.nix | 5 | ||||
-rw-r--r-- | flake.lock | 17 | ||||
-rw-r--r-- | flake.nix | 16 |
3 files changed, 36 insertions, 2 deletions
diff --git a/default.nix b/default.nix index 5582923..3e5d617 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,8 @@ { + cloudflareZlib ? (builtins.fetchTarball { + url = "https://github.com/cloudflare/zlib/archive/d20bdfcd0efbdd72cb9d857e098ceac1bad41432.tar.gz"; + sha256 = "sha256-KNS1FDznR2UaXo0WBOUh4lnVY23Kc9JnNyVtYzSpWDw="; + }), pkgs ? import (builtins.fetchTarball { url = "https://github.com/nixos/nixpkgs/archive/356c6dcdf37cfb4162f534e5dcabadddbfbd6bfa.tar.gz"; @@ -9,6 +13,7 @@ hp = pkgs.haskell.packages.ghc928.override { overrides = self: super: rec { cuckoo = markUnbroken (dontCheck super.cuckoo); + zlib = super.zlib.override {zlib = pkgs.zlib.overrideAttrs (_: {src = cloudflareZlib;});}; }; }; in @@ -1,5 +1,21 @@ { "nodes": { + "cloudflareZlib": { + "flake": false, + "locked": { + "lastModified": 1682701953, + "narHash": "sha256-KNS1FDznR2UaXo0WBOUh4lnVY23Kc9JnNyVtYzSpWDw=", + "owner": "cloudflare", + "repo": "zlib", + "rev": "d20bdfcd0efbdd72cb9d857e098ceac1bad41432", + "type": "github" + }, + "original": { + "owner": "cloudflare", + "repo": "zlib", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1690875999, @@ -17,6 +33,7 @@ }, "root": { "inputs": { + "cloudflareZlib": "cloudflareZlib", "nixpkgs": "nixpkgs" } } @@ -1,13 +1,25 @@ { inputs.nixpkgs.url = "github:nixos/nixpkgs"; + inputs.cloudflareZlib = { + url = "github:cloudflare/zlib"; + flake = false; + }; outputs = { self, nixpkgs, + cloudflareZlib, }: let system = "x86_64-linux"; - pkgs = import nixpkgs {inherit system;}; + pkgs = import nixpkgs { + inherit system; + overlays = [ + (_: super: + with super; { + }) + ]; + }; in { - packages.${system}.default = import ./. {inherit pkgs;}; + packages.${system}.default = import ./. {inherit pkgs cloudflareZlib;}; devShells.${system}.default = self.packages.${system}.default.env; }; } |