commit 507405051519dede273fd0c5244d815f02b3aa48
parent ee31fb730a7c96a118f4c18f28684dd9834918d0
Author: Jared Tobin <jared@jtobin.io>
Date: Mon, 16 Sep 2024 21:52:49 +0400
meta: flake tweaks
Diffstat:
M | flake.lock | | | 52 | +++++++++++----------------------------------------- |
M | flake.nix | | | 24 | +++++++++++------------- |
2 files changed, 22 insertions(+), 54 deletions(-)
diff --git a/flake.lock b/flake.lock
@@ -18,24 +18,6 @@
"type": "github"
}
},
- "flake-utils_2": {
- "inputs": {
- "systems": "systems_2"
- },
- "locked": {
- "lastModified": 1710146030,
- "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
- "owner": "numtide",
- "repo": "flake-utils",
- "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
- "type": "github"
- },
- "original": {
- "owner": "numtide",
- "repo": "flake-utils",
- "type": "github"
- }
- },
"nixpkgs": {
"locked": {
"lastModified": 1725910328,
@@ -54,27 +36,30 @@
},
"ppad-sha256": {
"inputs": {
- "flake-utils": "flake-utils_2",
+ "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
- "lastModified": 1726324606,
- "narHash": "sha256-fV6mQuQLOtPQzXBP4LLeerb7dgGnA3bPBdNfd3eND6A=",
- "ref": "v0.1.0",
- "rev": "6c0243df810e8959e193a0fe9e9f772235fefc52",
- "revCount": 64,
+ "lastModified": 1726493969,
+ "narHash": "sha256-toJ5A5+0/xijqVELjXfE3AdWV24B672R16JWq+gKLFk=",
+ "ref": "master",
+ "rev": "e92f4e13d6afa962109e76d35c6fcb38045e28ed",
+ "revCount": 69,
"type": "git",
"url": "git://git.ppad.tech/sha256.git"
},
"original": {
- "ref": "v0.1.0",
+ "ref": "master",
"type": "git",
"url": "git://git.ppad.tech/sha256.git"
}
},
"root": {
"inputs": {
- "flake-utils": "flake-utils",
+ "flake-utils": [
+ "ppad-sha256",
+ "flake-utils"
+ ],
"nixpkgs": [
"ppad-sha256",
"nixpkgs"
@@ -96,21 +81,6 @@
"repo": "default",
"type": "github"
}
- },
- "systems_2": {
- "locked": {
- "lastModified": 1681028828,
- "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
- "owner": "nix-systems",
- "repo": "default",
- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
- "type": "github"
- },
- "original": {
- "owner": "nix-systems",
- "repo": "default",
- "type": "github"
- }
}
},
"root": "root",
diff --git a/flake.nix b/flake.nix
@@ -2,15 +2,13 @@
description = "Pure Haskell cryptographic primitives on secp256k1";
inputs = {
- nixpkgs = {
- follows = "ppad-sha256/nixpkgs";
- };
- flake-utils.url = "github:numtide/flake-utils";
ppad-sha256 = {
type = "git";
url = "git://git.ppad.tech/sha256.git";
- ref = "v0.1.0";
+ ref = "master";
};
+ flake-utils.follows = "ppad-sha256/flake-utils";
+ nixpkgs.follows = "ppad-sha256/nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, ppad-sha256 }:
@@ -21,21 +19,21 @@
pkgs = import nixpkgs { inherit system; };
hlib = pkgs.haskell.lib;
- hpkgs = pkgs.haskell.packages.ghc964.override {
- overrides = new: old: {
- ppad-sha256 = ppad-sha256.packages.${system}.ppad-sha256;
- ${lib} = new.callCabal2nix lib ./. { };
+ sha256 = ppad-sha256.packages.${system}.default;
+
+ hpkgs = pkgs.haskell.packages.ghc964.extend (new: old: {
+ ppad-sha256 = ppad-sha256.packages.${system}.default;
+ ${lib} = new.callCabal2nix lib ./. {
+ inherit (new) ppad-sha256;
};
- };
+ });
cc = pkgs.stdenv.cc;
ghc = hpkgs.ghc;
cabal = hpkgs.cabal-install;
in
{
- packages.${lib} = hpkgs.${lib};
-
- packages.default = self.packages.${system}.${lib};
+ packages.default = hpkgs.${lib};
devShells.default = hpkgs.shellFor {
packages = p: [