Add nix flake
Some checks failed
Haskell-CI / Haskell-CI - Linux - ghc-8.10.7 (push) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-8.6.5 (push) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-8.8.4 (push) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-9.0.2 (push) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-9.2.7 (push) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-9.4.4 (push) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-8.10.7 (pull_request) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-8.6.5 (pull_request) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-8.8.4 (pull_request) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-9.0.2 (pull_request) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-9.2.7 (pull_request) Has been cancelled
Haskell-CI / Haskell-CI - Linux - ghc-9.4.4 (pull_request) Has been cancelled

This commit is contained in:
Rene Vergara 2025-04-10 12:55:37 -05:00
parent 335e804454
commit a273f48f89
Signed by: pitmutt
SSH key fingerprint: SHA256:vNa8FIqbBZjV9hOCkXyOzd7gqWCMCfkcfiPH2zaGfQ0
4 changed files with 65 additions and 35 deletions

View file

@ -1,5 +1,11 @@
# Revision history for foreign-rust
## 0.1.0.0 -- YYYY-mm-dd
## 0.2.0.0
### Added
- Nix flake infrastructure
## 0.1.0.0 --
* First version. Released on an unsuspecting world.

52
flake.lock generated
View file

@ -1,15 +1,31 @@
{
"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": 1706830856,
"narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=",
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
@ -20,11 +36,11 @@
},
"haskell-flake": {
"locked": {
"lastModified": 1707835791,
"narHash": "sha256-oQbDPHtver9DO8IJCBMq/TVbscCkxuw9tIfBBti71Yk=",
"lastModified": 1743922999,
"narHash": "sha256-Wh+Zak8sZUgair4pnZR0mLrLIhhInHS8izj7C1H10B8=",
"owner": "srid",
"repo": "haskell-flake",
"rev": "5113f700d6e92199fbe0574f7d12c775bb169702",
"rev": "d102e0f8a1773b1a63a616faef670cf5e129f9e9",
"type": "github"
},
"original": {
@ -35,11 +51,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1708307464,
"narHash": "sha256-OloBg9ZCoPrPqy8/ZoaoRB4kza3lKhnI0LuZq5xldhg=",
"lastModified": 1744157173,
"narHash": "sha256-bWSjxDwq7iVePrhmA7tY2dyMWHuNJo8knkO4y+q4ZkY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a332040396d7e3c47883e9c115c1da485712805e",
"rev": "6a39c6e495eefabc935d8ddf66aa45d85b85fa3f",
"type": "github"
},
"original": {
@ -51,24 +67,22 @@
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1706550542,
"narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "97b17f32362e475016f942bbdfda4a4a72a8a652",
"lastModified": 1743296961,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": {
"inputs": {
"borsh": "borsh",
"flake-parts": "flake-parts",
"haskell-flake": "haskell-flake",
"nixpkgs": "nixpkgs"

View file

@ -3,6 +3,8 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
borsh.url = "github:khazaddum/borsh";
borsh.flake = false;
};
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
@ -28,7 +30,11 @@
# aeson.source = "1.5.0.0"; # Hackage version override
# shower.source = inputs.shower;
# };
# settings = {
packages = {
borsh.source = inputs.borsh;
};
settings = {
# aeson = {
# check = false;
# };
@ -36,7 +42,10 @@
# haddock = false;
# broken = false;
# };
# };
foreign-rust = {
check = false;
};
};
# devShell = {
# # Enabled by default

View file

@ -1,6 +1,6 @@
cabal-version: 3.0
name: foreign-rust
version: 0.1.0
version: 0.2.0
license: BSD-3-Clause
license-file: LICENSE
author: Edsko de Vries
@ -14,6 +14,7 @@ tested-with: GHC==8.6.5
, GHC==9.0.2
, GHC==9.2.7
, GHC==9.4.4
, GHC==9.6.6
common lang
build-depends:
@ -121,15 +122,15 @@ test-suite test-foreign-rust
, tasty-hunit
, template-haskell
test-suite demo-annotated
import:
lang
type:
exitcode-stdio-1.0
main-is:
Main.hs
hs-source-dirs:
demo-annotated
build-depends:
, generics-sop
, foreign-rust
--test-suite demo-annotated
--import:
--lang
--type:
--exitcode-stdio-1.0
--main-is:
--Main.hs
--hs-source-dirs:
--demo-annotated
--build-depends:
--, generics-sop
--, foreign-rust