From 3385f8aac49c6b5af8baefa363578075eb760735 Mon Sep 17 00:00:00 2001 From: Viktor Kronvall Date: Mon, 9 Jan 2023 22:25:18 +0900 Subject: [PATCH 1/3] Create a spago.yaml for use with the registry --- spago.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 spago.yaml diff --git a/spago.yaml b/spago.yaml new file mode 100644 index 0000000..747a7b8 --- /dev/null +++ b/spago.yaml @@ -0,0 +1,6 @@ +package: + name: "uint" + dependencies: [ "prelude", "maybe", "numbers", "enums", "gen" ] + publish: + license: "MIT" + location: "https://github.com/purescript-contrib/purescript-uint.git" From a9fed64e5b716c83522070d107694f9ce285c535 Mon Sep 17 00:00:00 2001 From: Viktor Kronvall Date: Mon, 9 Jan 2023 22:36:37 +0900 Subject: [PATCH 2/3] Add flake to test out purescript2nix --- flake.lock | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 30 +++++++++++++++ spago.yaml | 4 ++ 3 files changed, 145 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c5b96c2 --- /dev/null +++ b/flake.lock @@ -0,0 +1,111 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1673269145, + "narHash": "sha256-FlkWoWLu1JiAp9+26HmrT2jpz4LGMEsrS8dyIINGnUQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d744fdbab93b048ec24cc7baf7598618d0eb9d3b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1671995294, + "narHash": "sha256-KDeHKinlHWSLZX1JEh3FFwHZ3RXx/Jak/QcUNC00BNo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "83d9cef1044cbccc2237d94b018fb0a2e25e97c4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "purescript-registry": { + "flake": false, + "locked": { + "lastModified": 1672067897, + "narHash": "sha256-9MtdAoPvUIRsMyY3nnVyFtjUwjGyan0ELFRR1BVV9tE=", + "owner": "purescript", + "repo": "registry", + "rev": "a83eadc5d79ac6ca728a66cfe093fa9bfc5ca91e", + "type": "github" + }, + "original": { + "owner": "purescript", + "repo": "registry", + "type": "github" + } + }, + "purescript-registry-index": { + "flake": false, + "locked": { + "lastModified": 1672067900, + "narHash": "sha256-oZUfucrvUPCNd8aOWdRLgm3ldsnwyjCw5KO6jRpVK1U=", + "owner": "purescript", + "repo": "registry-index", + "rev": "53da963f7b1ccb8cbd79c2944767efda8c3c664d", + "type": "github" + }, + "original": { + "owner": "purescript", + "repo": "registry-index", + "type": "github" + } + }, + "purescript2nix": { + "inputs": { + "nixpkgs": "nixpkgs_2", + "purescript-registry": "purescript-registry", + "purescript-registry-index": "purescript-registry-index" + }, + "locked": { + "lastModified": 1673245600, + "narHash": "sha256-SlN9R1KDBBZphQznrNVGzVtOeFvIV8uK8the4IFSEBk=", + "owner": "considerate", + "repo": "purescript2nix", + "rev": "e121aa54c7d2288265526bab719726f0d01d932c", + "type": "github" + }, + "original": { + "owner": "considerate", + "ref": "considerate/registry", + "repo": "purescript2nix", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "purescript2nix": "purescript2nix" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3c89aab --- /dev/null +++ b/flake.nix @@ -0,0 +1,30 @@ +{ + inputs = { + nixpkgs = { + url = "github:NixOS/nixpkgs"; + }; + purescript2nix = { + url = "github:considerate/purescript2nix/considerate/registry"; + }; + flake-utils = { + url = "github:numtide/flake-utils"; + }; + }; + outputs = inputs: + inputs.flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [ inputs.purescript2nix.overlay ]; + }; + uint = pkgs.purescript2nix { + src = ./.; + }; + in + { + packages = { + default = uint; + }; + defaultPackage = uint; + }); +} diff --git a/spago.yaml b/spago.yaml index 747a7b8..1145e9d 100644 --- a/spago.yaml +++ b/spago.yaml @@ -1,6 +1,10 @@ package: name: "uint" + version: 7.0.0 dependencies: [ "prelude", "maybe", "numbers", "enums", "gen" ] publish: license: "MIT" location: "https://github.com/purescript-contrib/purescript-uint.git" +workspace: + set: + registry: 8.6.0 From 912b863c8b3e264953aa32d85e03dbfd528bccfe Mon Sep 17 00:00:00 2001 From: Viktor Kronvall Date: Mon, 9 Jan 2023 23:51:16 +0900 Subject: [PATCH 3/3] Use purescript2nix from the main branch --- flake.lock | 29 ++++++++++++++--------------- flake.nix | 4 ++-- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index c5b96c2..9bc3927 100644 --- a/flake.lock +++ b/flake.lock @@ -32,11 +32,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1671995294, - "narHash": "sha256-KDeHKinlHWSLZX1JEh3FFwHZ3RXx/Jak/QcUNC00BNo=", + "lastModified": 1638854732, + "narHash": "sha256-a6iFNaiV1EDlBdFCsjzv4M1lVptPr5mNZMa0/tUINYA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "83d9cef1044cbccc2237d94b018fb0a2e25e97c4", + "rev": "bcfed07a3d30470143a2cae4c55ab952495ffe2f", "type": "github" }, "original": { @@ -48,11 +48,11 @@ "purescript-registry": { "flake": false, "locked": { - "lastModified": 1672067897, - "narHash": "sha256-9MtdAoPvUIRsMyY3nnVyFtjUwjGyan0ELFRR1BVV9tE=", + "lastModified": 1673124924, + "narHash": "sha256-pOL87XY/8Yz+lM/w+JKoC7q1SzMANDYVn+TPOMpMEqI=", "owner": "purescript", "repo": "registry", - "rev": "a83eadc5d79ac6ca728a66cfe093fa9bfc5ca91e", + "rev": "b22750980d7f01db620e98b946c4f8e54c67cb4c", "type": "github" }, "original": { @@ -64,11 +64,11 @@ "purescript-registry-index": { "flake": false, "locked": { - "lastModified": 1672067900, - "narHash": "sha256-oZUfucrvUPCNd8aOWdRLgm3ldsnwyjCw5KO6jRpVK1U=", + "lastModified": 1673124925, + "narHash": "sha256-spndyImhGxbf3st6BVCpySo3Z8tYkuvkEGc9ojfcUaU=", "owner": "purescript", "repo": "registry-index", - "rev": "53da963f7b1ccb8cbd79c2944767efda8c3c664d", + "rev": "ed418b7fb2f7ab0828f2c9d27d8a1f1c8084fcf7", "type": "github" }, "original": { @@ -84,16 +84,15 @@ "purescript-registry-index": "purescript-registry-index" }, "locked": { - "lastModified": 1673245600, - "narHash": "sha256-SlN9R1KDBBZphQznrNVGzVtOeFvIV8uK8the4IFSEBk=", - "owner": "considerate", + "lastModified": 1673275695, + "narHash": "sha256-+HxAn/CEZEatm+bGyP7Ih2waefxX6kCgz4YusoZdddw=", + "owner": "cdepillabout", "repo": "purescript2nix", - "rev": "e121aa54c7d2288265526bab719726f0d01d932c", + "rev": "91873f7dfd40bc1f36eb463d15eac7994da7b625", "type": "github" }, "original": { - "owner": "considerate", - "ref": "considerate/registry", + "owner": "cdepillabout", "repo": "purescript2nix", "type": "github" } diff --git a/flake.nix b/flake.nix index 3c89aab..4026263 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ url = "github:NixOS/nixpkgs"; }; purescript2nix = { - url = "github:considerate/purescript2nix/considerate/registry"; + url = "github:cdepillabout/purescript2nix"; }; flake-utils = { url = "github:numtide/flake-utils"; @@ -17,7 +17,7 @@ inherit system; overlays = [ inputs.purescript2nix.overlay ]; }; - uint = pkgs.purescript2nix { + uint = pkgs.purescript2nix.build { src = ./.; }; in