From 32ee47be03c58bb0e680c0045c8ff3cbd49a5b21 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Fri, 11 Apr 2025 14:43:50 -0500 Subject: [PATCH] add flake --- CHANGELOG.md | 6 ++ flake.lock | 180 ++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 13 +++- hexstring.cabal | 2 +- 4 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 flake.lock diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b416d7..60975c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.12.2.1] + +### Added + +- `flake.nix` + ## [0.12.2.0] ### Added diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..887bc31 --- /dev/null +++ b/flake.lock @@ -0,0 +1,180 @@ +{ + "nodes": { + "borsh": { + "flake": false, + "locked": { + "lastModified": 1716294836, + "narHash": "sha256-dEv3m7U7buQr9kX68U+r5Ro4KRXesGsSpqBs2CLddaY=", + "owner": "khazaddum", + "repo": "borsh", + "rev": "b8e5cfd6ed875707fa82698d5c356ac062203e71", + "type": "github" + }, + "original": { + "owner": "khazaddum", + "repo": "borsh", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "foreign-rust": { + "inputs": { + "borsh": "borsh", + "flake-parts": "flake-parts_2", + "haskell-flake": "haskell-flake", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1744308037, + "narHash": "sha256-9jZ6gXE6tfWzB3Nj2mUnEYxLo4g6jgaXSujVOtnxI/w=", + "ref": "main", + "rev": "1b06cbcd98b33fffa1c2cd57fed19e69120d6625", + "revCount": 27, + "type": "git", + "url": "https://code.vergara.tech/Vergara_Tech/haskell-foreign-rust" + }, + "original": { + "ref": "main", + "type": "git", + "url": "https://code.vergara.tech/Vergara_Tech/haskell-foreign-rust" + } + }, + "haskell-flake": { + "locked": { + "lastModified": 1743922999, + "narHash": "sha256-Wh+Zak8sZUgair4pnZR0mLrLIhhInHS8izj7C1H10B8=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "d102e0f8a1773b1a63a616faef670cf5e129f9e9", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "haskell-flake", + "type": "github" + } + }, + "haskell-flake_2": { + "locked": { + "lastModified": 1743922999, + "narHash": "sha256-Wh+Zak8sZUgair4pnZR0mLrLIhhInHS8izj7C1H10B8=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "d102e0f8a1773b1a63a616faef670cf5e129f9e9", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "haskell-flake", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1744157173, + "narHash": "sha256-bWSjxDwq7iVePrhmA7tY2dyMWHuNJo8knkO4y+q4ZkY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6a39c6e495eefabc935d8ddf66aa45d85b85fa3f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-lib_2": { + "locked": { + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1744316434, + "narHash": "sha256-lzFCg/1C39pyY2hMB2gcuHV79ozpOz/Vu15hdjiFOfI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d19cf9dfc633816a437204555afeb9e722386b76", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "foreign-rust": "foreign-rust", + "haskell-flake": "haskell-flake_2", + "nixpkgs": "nixpkgs_2" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 3520170..74e21f1 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,9 @@ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; haskell-flake.url = "github:srid/haskell-flake"; + foreign-rust.url = "git+https://code.vergara.tech/Vergara_Tech/haskell-foreign-rust?ref=main"; }; - outputs = inputs@{ self, nixpkgs, flake-parts, ... }: + outputs = inputs@{ self, nixpkgs, flake-parts, foreign-rust, ... }: flake-parts.lib.mkFlake { inherit inputs; } { systems = nixpkgs.lib.systems.flakeExposed; imports = [ inputs.haskell-flake.flakeModule ]; @@ -28,6 +29,9 @@ # aeson.source = "1.5.0.0"; # Hackage version override # shower.source = inputs.shower; # }; + packages = { + foreign-rust.source = inputs.foreign-rust; + }; settings = { # aeson = { @@ -37,6 +41,13 @@ # haddock = false; # broken = false; # }; + borsh = { + broken = false; + }; + + foreign-rust = { + check = false; + }; }; # devShell = { diff --git a/hexstring.cabal b/hexstring.cabal index 09aa9e0..e62eec4 100644 --- a/hexstring.cabal +++ b/hexstring.cabal @@ -5,7 +5,7 @@ cabal-version: 1.12 -- see: https://github.com/sol/hpack name: hexstring -version: 0.12.1.0 +version: 0.12.1.1 synopsis: Fast and safe representation of a hex string description: Provides an interface for converting any object that has a 'Binary' instance to and from a hexadecimal Text representation. author: Rene Vergara,