diff --git a/.packcheck.ignore b/.packcheck.ignore index 99f412e..8bb9ff7 100644 --- a/.packcheck.ignore +++ b/.packcheck.ignore @@ -2,3 +2,7 @@ .github/workflows/packcheck.yml .gitignore cabal.project.Werror +flake.lock +flake.nix +packages.nix +sources.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..1c13efb --- /dev/null +++ b/flake.lock @@ -0,0 +1,88 @@ +{ + "nodes": { + "composewell-haskell": { + "inputs": { + "nixpack": "nixpack", + "nixpkgs": "nixpkgs", + "nixpkgs-darwin": "nixpkgs-darwin" + }, + "locked": { + "lastModified": 1761651882, + "narHash": "sha256-zpMxSiKyBfwJfN93b+4xmCWBWqLsLBKcolalvHp/e5c=", + "ref": "master", + "rev": "0479fcff715c7b92f0a917b4cffd25371716b4f4", + "revCount": 94, + "type": "git", + "url": "ssh://git@github.com/composewell/streamly-packages" + }, + "original": { + "ref": "master", + "type": "git", + "url": "ssh://git@github.com/composewell/streamly-packages" + } + }, + "nixpack": { + "locked": { + "lastModified": 1761597511, + "narHash": "sha256-8c62+6zbf2mtx2ZGQ09JgkBXa9zNPUA7CT+tS173NR8=", + "owner": "composewell", + "repo": "nixpack", + "rev": "e50da53dfcf24085fff75149a266646b28bd18fb", + "type": "github" + }, + "original": { + "owner": "composewell", + "repo": "nixpack", + "rev": "e50da53dfcf24085fff75149a266646b28bd18fb", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1761440988, + "narHash": "sha256-2qsow3cQIgZB2g8Cy8cW+L9eXDHP6a1PsvOschk5y+E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "de69d2ba6c70e747320df9c096523b623d3a4c35", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "de69d2ba6c70e747320df9c096523b623d3a4c35", + "type": "github" + } + }, + "nixpkgs-darwin": { + "locked": { + "lastModified": 1758397774, + "narHash": "sha256-ui5ciTMlP4nSkxHAjfJTUCt/INLykPuv/Z7Ifj4GmhA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c3d456aad3a84fcd76b4bebf8b48be169fc45c31", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c3d456aad3a84fcd76b4bebf8b48be169fc45c31", + "type": "github" + } + }, + "root": { + "inputs": { + "composewell-haskell": "composewell-haskell", + "nixpkgs": [ + "composewell-haskell", + "nixpkgs" + ], + "nixpkgs-darwin": [ + "composewell-haskell", + "nixpkgs-darwin" + ] + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0b5daff --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "streamly-text"; + + inputs = { + #composewell-haskell.url = "git+ssh://git@github.com/composewell/streamly-packages?rev=0479fcff715c7b92f0a917b4cffd25371716b4f4"; + composewell-haskell.url = "git+ssh://git@github.com/composewell/streamly-packages?ref=master"; + nixpkgs.follows = "composewell-haskell/nixpkgs"; + nixpkgs-darwin.follows = "composewell-haskell/nixpkgs-darwin"; + }; + + outputs = { self, nixpkgs, nixpkgs-darwin, composewell-haskell }: + let + nixpack = composewell-haskell.nixpack; + src1 = import "${composewell-haskell}/sources.nix" { inherit nixpack; }; + src2 = import ./sources.nix {inherit nixpack;}; + in nixpack.flakeOutputs { + inherit nixpkgs; + inherit nixpkgs-darwin; + inherit nixpack; + nixpkgsOptions = { + config.allowUnfree = true; + config.allowBroken = true; + }; + envOptions = { + name = "streamly-text-env"; + sources = nixpack.lib.mergeSources src1 src2; + packages = import ./packages.nix; + compiler = "default"; + hoogle = false; + isDev = true; + }; + }; +} diff --git a/packages.nix b/packages.nix new file mode 100644 index 0000000..07e4721 --- /dev/null +++ b/packages.nix @@ -0,0 +1,14 @@ +{ nixpkgs }: +{ +dev-packages = +with nixpkgs.haskellPackages; +[ streamly-text +]; +libraries = +with nixpkgs.haskellPackages; +[ + temporary + quickcheck-instances + hspec +]; +} diff --git a/sources.nix b/sources.nix new file mode 100644 index 0000000..f182075 --- /dev/null +++ b/sources.nix @@ -0,0 +1,9 @@ +{nixpack}: +with nixpack.sources; +{ +layers = [ +{ + streamly-text = local ./.; +} +]; +}