From 053a1fb48d022bcece07d33ad6bb87e7e701b72d Mon Sep 17 00:00:00 2001 From: Tom Sydney Kerckhove Date: Sun, 11 Aug 2024 15:09:08 +0200 Subject: [PATCH] nix flake --- .envrc | 1 + Setup.hs | 2 - cabal.project | 2 + default.nix | 48 +++ flake.lock | 364 ++++++++++++++++++ flake.nix | 55 +++ nix/overlay.nix | 13 + nix/overrides.nix | 5 + CHANGELOG => path/CHANGELOG | 0 LICENSE => path/LICENSE | 0 path/default.nix | 21 + .../System/OsString/Compat/Include.hs | 0 .../System/OsString/Compat/Posix.hs | 0 .../System/OsString/Compat/Windows.hs | 0 path.cabal => path/path.cabal | 11 +- {src => path/src}/OsPath.hs | 0 {src => path/src}/OsPath/Include.hs | 0 {src => path/src}/OsPath/Internal.hs | 0 {src => path/src}/OsPath/Internal/Include.hs | 0 {src => path/src}/OsPath/Internal/Posix.hs | 0 {src => path/src}/OsPath/Internal/Windows.hs | 0 {src => path/src}/OsPath/Posix.hs | 0 {src => path/src}/OsPath/Windows.hs | 0 {src => path/src}/Path.hs | 0 {src => path/src}/Path/Include.hs | 0 {src => path/src}/Path/Internal.hs | 0 {src => path/src}/Path/Internal/Include.hs | 0 {src => path/src}/Path/Internal/Posix.hs | 0 {src => path/src}/Path/Internal/Windows.hs | 0 {src => path/src}/Path/Posix.hs | 0 {src => path/src}/Path/Windows.hs | 0 .../test-ospath}/Common/Include.hs | 0 .../test-ospath}/Common/Posix.hs | 0 .../test-ospath}/Common/Windows.hs | 0 {test-ospath => path/test-ospath}/Main.hs | 0 {test-ospath => path/test-ospath}/Posix.hs | 0 .../test-ospath}/TH/Include.hs | 0 {test-ospath => path/test-ospath}/TH/Posix.hs | 0 .../test-ospath}/TH/Windows.hs | 0 {test-ospath => path/test-ospath}/Windows.hs | 0 {test => path/test}/Common/Include.hs | 0 {test => path/test}/Common/Posix.hs | 0 {test => path/test}/Common/Windows.hs | 0 {test => path/test}/Main.hs | 0 {test => path/test}/Posix.hs | 0 {test => path/test}/TH/Include.hs | 0 {test => path/test}/TH/Posix.hs | 0 {test => path/test}/TH/Windows.hs | 0 {test => path/test}/Windows.hs | 0 .../validity-test-ospath}/Include.hs | 0 .../validity-test-ospath}/Main.hs | 0 .../OsPath/Gen/Include.hs | 0 .../validity-test-ospath}/OsPath/Gen/Posix.hs | 0 .../OsPath/Gen/Windows.hs | 0 .../validity-test-ospath}/Posix.hs | 0 .../validity-test-ospath}/Windows.hs | 0 {validity-test => path/validity-test}/Main.hs | 0 .../validity-test}/Path/Gen.hs | 0 stack.os-string.yaml | 3 +- stack.yaml | 2 + 60 files changed, 519 insertions(+), 8 deletions(-) create mode 100644 .envrc delete mode 100644 Setup.hs create mode 100644 cabal.project create mode 100644 default.nix create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 nix/overlay.nix create mode 100644 nix/overrides.nix rename CHANGELOG => path/CHANGELOG (100%) rename LICENSE => path/LICENSE (100%) create mode 100644 path/default.nix rename {os-string-compat => path/os-string-compat}/System/OsString/Compat/Include.hs (100%) rename {os-string-compat => path/os-string-compat}/System/OsString/Compat/Posix.hs (100%) rename {os-string-compat => path/os-string-compat}/System/OsString/Compat/Windows.hs (100%) rename path.cabal => path/path.cabal (97%) rename {src => path/src}/OsPath.hs (100%) rename {src => path/src}/OsPath/Include.hs (100%) rename {src => path/src}/OsPath/Internal.hs (100%) rename {src => path/src}/OsPath/Internal/Include.hs (100%) rename {src => path/src}/OsPath/Internal/Posix.hs (100%) rename {src => path/src}/OsPath/Internal/Windows.hs (100%) rename {src => path/src}/OsPath/Posix.hs (100%) rename {src => path/src}/OsPath/Windows.hs (100%) rename {src => path/src}/Path.hs (100%) rename {src => path/src}/Path/Include.hs (100%) rename {src => path/src}/Path/Internal.hs (100%) rename {src => path/src}/Path/Internal/Include.hs (100%) rename {src => path/src}/Path/Internal/Posix.hs (100%) rename {src => path/src}/Path/Internal/Windows.hs (100%) rename {src => path/src}/Path/Posix.hs (100%) rename {src => path/src}/Path/Windows.hs (100%) rename {test-ospath => path/test-ospath}/Common/Include.hs (100%) rename {test-ospath => path/test-ospath}/Common/Posix.hs (100%) rename {test-ospath => path/test-ospath}/Common/Windows.hs (100%) rename {test-ospath => path/test-ospath}/Main.hs (100%) rename {test-ospath => path/test-ospath}/Posix.hs (100%) rename {test-ospath => path/test-ospath}/TH/Include.hs (100%) rename {test-ospath => path/test-ospath}/TH/Posix.hs (100%) rename {test-ospath => path/test-ospath}/TH/Windows.hs (100%) rename {test-ospath => path/test-ospath}/Windows.hs (100%) rename {test => path/test}/Common/Include.hs (100%) rename {test => path/test}/Common/Posix.hs (100%) rename {test => path/test}/Common/Windows.hs (100%) rename {test => path/test}/Main.hs (100%) rename {test => path/test}/Posix.hs (100%) rename {test => path/test}/TH/Include.hs (100%) rename {test => path/test}/TH/Posix.hs (100%) rename {test => path/test}/TH/Windows.hs (100%) rename {test => path/test}/Windows.hs (100%) rename {validity-test-ospath => path/validity-test-ospath}/Include.hs (100%) rename {validity-test-ospath => path/validity-test-ospath}/Main.hs (100%) rename {validity-test-ospath => path/validity-test-ospath}/OsPath/Gen/Include.hs (100%) rename {validity-test-ospath => path/validity-test-ospath}/OsPath/Gen/Posix.hs (100%) rename {validity-test-ospath => path/validity-test-ospath}/OsPath/Gen/Windows.hs (100%) rename {validity-test-ospath => path/validity-test-ospath}/Posix.hs (100%) rename {validity-test-ospath => path/validity-test-ospath}/Windows.hs (100%) rename {validity-test => path/validity-test}/Main.hs (100%) rename {validity-test => path/validity-test}/Path/Gen.hs (100%) diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/Setup.hs b/Setup.hs deleted file mode 100644 index 9a994af..0000000 --- a/Setup.hs +++ /dev/null @@ -1,2 +0,0 @@ -import Distribution.Simple -main = defaultMain diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..f673831 --- /dev/null +++ b/cabal.project @@ -0,0 +1,2 @@ +packages: */*.cabal +test-show-details: direct diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..8c66233 --- /dev/null +++ b/default.nix @@ -0,0 +1,48 @@ +{ mkDerivation +, aeson +, base +, bytestring +, deepseq +, exceptions +, filepath +, genvalidity +, genvalidity-hspec +, hashable +, hspec +, lib +, QuickCheck +, template-haskell +, text +, validity-bytestring +}: +mkDerivation { + pname = "path"; + version = "0.9.6"; + src = ./.; + libraryHaskellDepends = [ + aeson + base + deepseq + exceptions + filepath + hashable + template-haskell + text + ]; + testHaskellDepends = [ + aeson + base + bytestring + exceptions + filepath + genvalidity + genvalidity-hspec + hspec + QuickCheck + template-haskell + validity-bytestring + ]; + doHaddock = false; + description = "Support for well-typed paths"; + license = lib.licenses.bsd3; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c67bdcb --- /dev/null +++ b/flake.lock @@ -0,0 +1,364 @@ +{ + "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "horizon-advance": { + "inputs": { + "flake-parts": [ + "horizon-advance", + "horizon-core", + "flake-parts" + ], + "horizon-core": "horizon-core", + "horizon-hoogle": "horizon-hoogle_2", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1719751316, + "narHash": "sha256-exJ80zZPyiSxiYQb4IreK7LDpjfBLOCPb77QUn3TGR8=", + "ref": "refs/heads/master", + "rev": "36784235da4dd828b3e139a855dc8410fff91376", + "revCount": 259, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-advance" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-advance" + } + }, + "horizon-build-packages": { + "inputs": { + "flake-parts": [ + "horizon-advance", + "horizon-core", + "horizon-build-packages", + "horizon-ghc", + "flake-parts" + ], + "horizon-ghc": "horizon-ghc", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1718969469, + "narHash": "sha256-0Q8v/yNwcLZy0znegLXx/SQmbfd2d/4TBSrFYh7g7+0=", + "ref": "refs/heads/master", + "rev": "23fa82740dc197706a3737c8830b724ccabafac4", + "revCount": 96, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-build-packages" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-build-packages" + } + }, + "horizon-core": { + "inputs": { + "flake-parts": "flake-parts", + "horizon-build-packages": "horizon-build-packages", + "horizon-hoogle": "horizon-hoogle", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1718977916, + "narHash": "sha256-sssWF/XjZga4asgwvovPLAbg8E2EyLDQOYSFgUbKg6c=", + "ref": "refs/heads/master", + "rev": "81674e75e63548341ebe0cb94127044255affb55", + "revCount": 1375, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/package-sets/horizon-core" + } + }, + "horizon-ghc": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1718969245, + "narHash": "sha256-eeMsOK3Hmm23SH45GdbuWRtpEcMWZPC/JCYvKL2LOos=", + "ref": "refs/heads/master", + "rev": "0bcfe994903359aef81338915706bf6b2f38aaa4", + "revCount": 109, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/ghc/horizon-ghc" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/ghc/horizon-ghc" + } + }, + "horizon-hoogle": { + "locked": { + "lastModified": 1701521742, + "narHash": "sha256-huf/95jYL7mY0AHSziJYXx4m/sP+G+YAbJb+Q5Ph/Jg=", + "ref": "refs/heads/master", + "rev": "ddf3b08c6458c1a9e0d881f968c050bc828b9b8e", + "revCount": 2, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" + } + }, + "horizon-hoogle_2": { + "locked": { + "lastModified": 1701521742, + "narHash": "sha256-huf/95jYL7mY0AHSziJYXx4m/sP+G+YAbJb+Q5Ph/Jg=", + "ref": "refs/heads/master", + "rev": "ddf3b08c6458c1a9e0d881f968c050bc828b9b8e", + "revCount": 2, + "type": "git", + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" + }, + "original": { + "type": "git", + "url": "https://gitlab.horizon-haskell.net/nix/horizon-hoogle" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1718928808, + "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "564000ae34c6af8549f3729051bbae33403e298c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "haskell-updates", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + } + }, + "nixpkgs-lib_2": { + "locked": { + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1718928808, + "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "564000ae34c6af8549f3729051bbae33403e298c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "haskell-updates", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1718928808, + "narHash": "sha256-MjVGflb3qXOrJRTJ5siQZHYuMCsRHaqYgTSKSik+/sE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "564000ae34c6af8549f3729051bbae33403e298c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "haskell-updates", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1719706517, + "narHash": "sha256-ynXAAr5AJgTQHQAJW4GH3i8auqnZVzcjCokZMdEKjcs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "01da4c59cc4879540b7a5d73230475b4616a0dc8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "haskell-updates", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1723282977, + "narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1719082008, + "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9693852a2070b398ee123a329e68f0dab5526681", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": "nixpkgs_6", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1723202784, + "narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "c7012d0c18567c889b948781bc74a501e92275d1", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "horizon-advance": "horizon-advance", + "nixpkgs": "nixpkgs_5", + "pre-commit-hooks": "pre-commit-hooks" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..1a45320 --- /dev/null +++ b/flake.nix @@ -0,0 +1,55 @@ +{ + description = "path"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + horizon-advance.url = "git+https://gitlab.horizon-haskell.net/package-sets/horizon-advance"; + pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; + }; + + outputs = + { self + , nixpkgs + , horizon-advance + , pre-commit-hooks + }: + let + system = "x86_64-linux"; + nixpkgsFor = nixpkgs: import nixpkgs { inherit system; config.allowUnfree = true; }; + pkgs = nixpkgsFor nixpkgs; + allOverrides = pkgs.lib.composeManyExtensions [ + self.overrides.${system} + ]; + horizonPkgs = horizon-advance.legacyPackages.${system}.extend allOverrides; + haskellPackagesFor = nixpkgs: (nixpkgsFor nixpkgs).haskellPackages.extend allOverrides; + haskellPackages = haskellPackagesFor nixpkgs; + in + { + overrides.${system} = pkgs.callPackage ./nix/overrides.nix { }; + overlays.${system} = import ./nix/overlay.nix; + packages.${system}.default = haskellPackages.path; + checks.${system} = { + forwardCompatibility = horizonPkgs.path; + release = haskellPackages.path; + pre-commit = pre-commit-hooks.lib.${system}.run { + src = ./.; + hooks = { + nixpkgs-fmt.enable = true; + nixpkgs-fmt.excludes = [ ".*/default.nix" ]; + deadnix.enable = true; + cabal2nix.enable = true; + }; + }; + }; + devShells.${system}.default = haskellPackages.shellFor { + name = "path-shell"; + packages = p: [ p.path ]; + withHoogle = true; + doBenchmark = true; + buildInputs = with pkgs; [ + zlib + cabal-install + ] ++ self.checks.${system}.pre-commit.enabledPackages; + shellHook = self.checks.${system}.pre-commit.shellHook; + }; + }; +} diff --git a/nix/overlay.nix b/nix/overlay.nix new file mode 100644 index 0000000..2306b7f --- /dev/null +++ b/nix/overlay.nix @@ -0,0 +1,13 @@ +final: prev: +let + overrides = final.callPackage ./overrides.nix { }; + addOverrides = old: { overrides = final.lib.composeExtensions (old.overrides or (_: _: { })) overrides; }; +in +{ + haskell = prev.haskell // { + packages = builtins.mapAttrs + (_: haskellPackages: haskellPackages.override addOverrides) + prev.haskell.packages; + }; + haskellPackages = prev.haskellPackages.override addOverrides; +} diff --git a/nix/overrides.nix b/nix/overrides.nix new file mode 100644 index 0000000..5bdf32f --- /dev/null +++ b/nix/overrides.nix @@ -0,0 +1,5 @@ +{ haskell }: +self: _: +{ + path = haskell.lib.buildStrictly (self.callPackage ../path { }); +} diff --git a/CHANGELOG b/path/CHANGELOG similarity index 100% rename from CHANGELOG rename to path/CHANGELOG diff --git a/LICENSE b/path/LICENSE similarity index 100% rename from LICENSE rename to path/LICENSE diff --git a/path/default.nix b/path/default.nix new file mode 100644 index 0000000..b3d10ac --- /dev/null +++ b/path/default.nix @@ -0,0 +1,21 @@ +{ mkDerivation, aeson, base, bytestring, deepseq, exceptions +, filepath, genvalidity, genvalidity-hspec, hashable, hspec, lib +, QuickCheck, template-haskell, text, validity-bytestring +}: +mkDerivation { + pname = "path"; + version = "0.9.6"; + src = ./.; + libraryHaskellDepends = [ + aeson base deepseq exceptions filepath hashable template-haskell + text + ]; + testHaskellDepends = [ + aeson base bytestring exceptions filepath genvalidity + genvalidity-hspec hspec QuickCheck template-haskell + validity-bytestring + ]; + doHaddock = false; + description = "Support for well-typed paths"; + license = lib.licenses.bsd3; +} diff --git a/os-string-compat/System/OsString/Compat/Include.hs b/path/os-string-compat/System/OsString/Compat/Include.hs similarity index 100% rename from os-string-compat/System/OsString/Compat/Include.hs rename to path/os-string-compat/System/OsString/Compat/Include.hs diff --git a/os-string-compat/System/OsString/Compat/Posix.hs b/path/os-string-compat/System/OsString/Compat/Posix.hs similarity index 100% rename from os-string-compat/System/OsString/Compat/Posix.hs rename to path/os-string-compat/System/OsString/Compat/Posix.hs diff --git a/os-string-compat/System/OsString/Compat/Windows.hs b/path/os-string-compat/System/OsString/Compat/Windows.hs similarity index 100% rename from os-string-compat/System/OsString/Compat/Windows.hs rename to path/os-string-compat/System/OsString/Compat/Windows.hs diff --git a/path.cabal b/path/path.cabal similarity index 97% rename from path.cabal rename to path/path.cabal index 443c697..e522a5d 100644 --- a/path.cabal +++ b/path/path.cabal @@ -11,15 +11,16 @@ copyright: 2015–2018 FP Complete category: System, Filesystem build-type: Simple tested-with: GHC==9.2.8, GHC==9.4.8, GHC==9.6.6, GHC==9.8.2, GHC==9.10.1 -extra-source-files: README.md - , CHANGELOG +extra-source-files: CHANGELOG , os-string-compat/System/OsString/Compat/Include.hs - , src/Path/Include.hs - , src/Path/Internal/Include.hs , src/OsPath/Include.hs , src/OsPath/Internal/Include.hs - , test/Common/Include.hs + , src/Path/Include.hs + , src/Path/Internal/Include.hs , test-ospath/Common/Include.hs + , test-ospath/TH/Include.hs + , test/Common/Include.hs + , test/TH/Include.hs , validity-test-ospath/Include.hs , validity-test-ospath/OsPath/Gen/Include.hs diff --git a/src/OsPath.hs b/path/src/OsPath.hs similarity index 100% rename from src/OsPath.hs rename to path/src/OsPath.hs diff --git a/src/OsPath/Include.hs b/path/src/OsPath/Include.hs similarity index 100% rename from src/OsPath/Include.hs rename to path/src/OsPath/Include.hs diff --git a/src/OsPath/Internal.hs b/path/src/OsPath/Internal.hs similarity index 100% rename from src/OsPath/Internal.hs rename to path/src/OsPath/Internal.hs diff --git a/src/OsPath/Internal/Include.hs b/path/src/OsPath/Internal/Include.hs similarity index 100% rename from src/OsPath/Internal/Include.hs rename to path/src/OsPath/Internal/Include.hs diff --git a/src/OsPath/Internal/Posix.hs b/path/src/OsPath/Internal/Posix.hs similarity index 100% rename from src/OsPath/Internal/Posix.hs rename to path/src/OsPath/Internal/Posix.hs diff --git a/src/OsPath/Internal/Windows.hs b/path/src/OsPath/Internal/Windows.hs similarity index 100% rename from src/OsPath/Internal/Windows.hs rename to path/src/OsPath/Internal/Windows.hs diff --git a/src/OsPath/Posix.hs b/path/src/OsPath/Posix.hs similarity index 100% rename from src/OsPath/Posix.hs rename to path/src/OsPath/Posix.hs diff --git a/src/OsPath/Windows.hs b/path/src/OsPath/Windows.hs similarity index 100% rename from src/OsPath/Windows.hs rename to path/src/OsPath/Windows.hs diff --git a/src/Path.hs b/path/src/Path.hs similarity index 100% rename from src/Path.hs rename to path/src/Path.hs diff --git a/src/Path/Include.hs b/path/src/Path/Include.hs similarity index 100% rename from src/Path/Include.hs rename to path/src/Path/Include.hs diff --git a/src/Path/Internal.hs b/path/src/Path/Internal.hs similarity index 100% rename from src/Path/Internal.hs rename to path/src/Path/Internal.hs diff --git a/src/Path/Internal/Include.hs b/path/src/Path/Internal/Include.hs similarity index 100% rename from src/Path/Internal/Include.hs rename to path/src/Path/Internal/Include.hs diff --git a/src/Path/Internal/Posix.hs b/path/src/Path/Internal/Posix.hs similarity index 100% rename from src/Path/Internal/Posix.hs rename to path/src/Path/Internal/Posix.hs diff --git a/src/Path/Internal/Windows.hs b/path/src/Path/Internal/Windows.hs similarity index 100% rename from src/Path/Internal/Windows.hs rename to path/src/Path/Internal/Windows.hs diff --git a/src/Path/Posix.hs b/path/src/Path/Posix.hs similarity index 100% rename from src/Path/Posix.hs rename to path/src/Path/Posix.hs diff --git a/src/Path/Windows.hs b/path/src/Path/Windows.hs similarity index 100% rename from src/Path/Windows.hs rename to path/src/Path/Windows.hs diff --git a/test-ospath/Common/Include.hs b/path/test-ospath/Common/Include.hs similarity index 100% rename from test-ospath/Common/Include.hs rename to path/test-ospath/Common/Include.hs diff --git a/test-ospath/Common/Posix.hs b/path/test-ospath/Common/Posix.hs similarity index 100% rename from test-ospath/Common/Posix.hs rename to path/test-ospath/Common/Posix.hs diff --git a/test-ospath/Common/Windows.hs b/path/test-ospath/Common/Windows.hs similarity index 100% rename from test-ospath/Common/Windows.hs rename to path/test-ospath/Common/Windows.hs diff --git a/test-ospath/Main.hs b/path/test-ospath/Main.hs similarity index 100% rename from test-ospath/Main.hs rename to path/test-ospath/Main.hs diff --git a/test-ospath/Posix.hs b/path/test-ospath/Posix.hs similarity index 100% rename from test-ospath/Posix.hs rename to path/test-ospath/Posix.hs diff --git a/test-ospath/TH/Include.hs b/path/test-ospath/TH/Include.hs similarity index 100% rename from test-ospath/TH/Include.hs rename to path/test-ospath/TH/Include.hs diff --git a/test-ospath/TH/Posix.hs b/path/test-ospath/TH/Posix.hs similarity index 100% rename from test-ospath/TH/Posix.hs rename to path/test-ospath/TH/Posix.hs diff --git a/test-ospath/TH/Windows.hs b/path/test-ospath/TH/Windows.hs similarity index 100% rename from test-ospath/TH/Windows.hs rename to path/test-ospath/TH/Windows.hs diff --git a/test-ospath/Windows.hs b/path/test-ospath/Windows.hs similarity index 100% rename from test-ospath/Windows.hs rename to path/test-ospath/Windows.hs diff --git a/test/Common/Include.hs b/path/test/Common/Include.hs similarity index 100% rename from test/Common/Include.hs rename to path/test/Common/Include.hs diff --git a/test/Common/Posix.hs b/path/test/Common/Posix.hs similarity index 100% rename from test/Common/Posix.hs rename to path/test/Common/Posix.hs diff --git a/test/Common/Windows.hs b/path/test/Common/Windows.hs similarity index 100% rename from test/Common/Windows.hs rename to path/test/Common/Windows.hs diff --git a/test/Main.hs b/path/test/Main.hs similarity index 100% rename from test/Main.hs rename to path/test/Main.hs diff --git a/test/Posix.hs b/path/test/Posix.hs similarity index 100% rename from test/Posix.hs rename to path/test/Posix.hs diff --git a/test/TH/Include.hs b/path/test/TH/Include.hs similarity index 100% rename from test/TH/Include.hs rename to path/test/TH/Include.hs diff --git a/test/TH/Posix.hs b/path/test/TH/Posix.hs similarity index 100% rename from test/TH/Posix.hs rename to path/test/TH/Posix.hs diff --git a/test/TH/Windows.hs b/path/test/TH/Windows.hs similarity index 100% rename from test/TH/Windows.hs rename to path/test/TH/Windows.hs diff --git a/test/Windows.hs b/path/test/Windows.hs similarity index 100% rename from test/Windows.hs rename to path/test/Windows.hs diff --git a/validity-test-ospath/Include.hs b/path/validity-test-ospath/Include.hs similarity index 100% rename from validity-test-ospath/Include.hs rename to path/validity-test-ospath/Include.hs diff --git a/validity-test-ospath/Main.hs b/path/validity-test-ospath/Main.hs similarity index 100% rename from validity-test-ospath/Main.hs rename to path/validity-test-ospath/Main.hs diff --git a/validity-test-ospath/OsPath/Gen/Include.hs b/path/validity-test-ospath/OsPath/Gen/Include.hs similarity index 100% rename from validity-test-ospath/OsPath/Gen/Include.hs rename to path/validity-test-ospath/OsPath/Gen/Include.hs diff --git a/validity-test-ospath/OsPath/Gen/Posix.hs b/path/validity-test-ospath/OsPath/Gen/Posix.hs similarity index 100% rename from validity-test-ospath/OsPath/Gen/Posix.hs rename to path/validity-test-ospath/OsPath/Gen/Posix.hs diff --git a/validity-test-ospath/OsPath/Gen/Windows.hs b/path/validity-test-ospath/OsPath/Gen/Windows.hs similarity index 100% rename from validity-test-ospath/OsPath/Gen/Windows.hs rename to path/validity-test-ospath/OsPath/Gen/Windows.hs diff --git a/validity-test-ospath/Posix.hs b/path/validity-test-ospath/Posix.hs similarity index 100% rename from validity-test-ospath/Posix.hs rename to path/validity-test-ospath/Posix.hs diff --git a/validity-test-ospath/Windows.hs b/path/validity-test-ospath/Windows.hs similarity index 100% rename from validity-test-ospath/Windows.hs rename to path/validity-test-ospath/Windows.hs diff --git a/validity-test/Main.hs b/path/validity-test/Main.hs similarity index 100% rename from validity-test/Main.hs rename to path/validity-test/Main.hs diff --git a/validity-test/Path/Gen.hs b/path/validity-test/Path/Gen.hs similarity index 100% rename from validity-test/Path/Gen.hs rename to path/validity-test/Path/Gen.hs diff --git a/stack.os-string.yaml b/stack.os-string.yaml index a8fd199..7a2b9ed 100644 --- a/stack.os-string.yaml +++ b/stack.os-string.yaml @@ -1,5 +1,6 @@ resolver: lts-22.32 # GHC 9.6.6 - +packages: +- path extra-deps: - directory-1.3.8.5@sha256:fbeec9ec346e5272167f63dcb86af513b457a7b9fc36dc818e4c7b81608d612b,3166 - filepath-1.5.3.0@sha256:0c64bc9a4f5946c86a8f0527bf40c8ba51e2c02d36eea0e20ea558c8d94166e8,4945 diff --git a/stack.yaml b/stack.yaml index 6bd54bd..cdbb03c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1 +1,3 @@ resolver: lts-22.32 # GHC 9.6.6 +packages: +- path