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 # 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. * First version. Released on an unsuspecting world.

52
flake.lock generated
View file

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

View file

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

View file

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