diff --git a/.gitignore b/.gitignore index 6200a1e..c81ff34 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ bin/ /Dockerfile /docker-stack.yml .stack-work/ +*.swp +dist* *~ diff --git a/TODO b/TODO index cfc4bda..e69de29 100644 --- a/TODO +++ b/TODO @@ -1 +0,0 @@ -- Make the Docker images much smaller diff --git a/flake.lock b/flake.lock index a8c529a..c890336 100644 --- a/flake.lock +++ b/flake.lock @@ -18,56 +18,7 @@ "type": "github" } }, - "flake-utils_2": { - "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nix2container": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1677791117, - "narHash": "sha256-zL4Fc5133KMqX7zCzcPODaBPEblUfgQt2UccNBm34Pc=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "85670cab354f7df69dd4af097c27cf9bc5826cb2", - "type": "github" - }, - "original": { - "owner": "nlewo", - "repo": "nix2container", - "type": "github" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1677612629, - "narHash": "sha256-yC+9LfhfwOd5sXFW8TLnDmqVMNYiHXYPGy9BbdpRqfU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "111ca8e0378e88d9decaa1c6dd7597f35d8bc67f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1683159243, "narHash": "sha256-Fh41KQcZTswb4NyYfSsbNEhDS/Im0/Id6m3k7qZ6/Xw=", @@ -85,8 +36,7 @@ "root": { "inputs": { "flake-utils": "flake-utils", - "nix2container": "nix2container", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" } }, "systems": { diff --git a/flake.nix b/flake.nix index 5c4704d..480447c 100644 --- a/flake.nix +++ b/flake.nix @@ -4,25 +4,21 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; - nix2container.url = "github:nlewo/nix2container"; }; - outputs = { self, nixpkgs, flake-utils, nix2container }: + outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; packageName = "purr"; dockerPackageName = "${packageName}-docker"; - nix2containerPkgs = nix2container.packages.x86_64-linux; - haskellPackages = pkgs.haskellPackages; enableSharedExecutables = false; enableSharedLibraries = false; purr = pkgs.haskell.lib.justStaticExecutables self.packages.${system}.default; - in { packages.${packageName} = @@ -35,10 +31,10 @@ buildInputs = with pkgs; [ ghcid cabal-install + ghc ]; - inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system}); + inputsFrom = builtins.attrValues self.packages.${system}; }; - devShell = self.devShells.${system}.default; packages.${dockerPackageName} = pkgs.dockerTools.buildImage {