diff --git a/Purr.cabal b/Purr.cabal index 38f3688..f9df5c0 100644 --- a/Purr.cabal +++ b/Purr.cabal @@ -1,8 +1,8 @@ cabal-version: 1.12 -name: purr +name: Purr version: 0.3.0 -description: https://git.eversole.co/purr +description: https://git.eversole.co/Purr author: James Eversole maintainer: james@eversole.co copyright: 2022 James Eversole @@ -65,7 +65,7 @@ library , wai-middleware-static >=0.5 default-language: Haskell2010 -executable Purr-musl +executable Purr main-is: Main.hs other-modules: Paths_Purr diff --git a/README b/README index 654ce70..7f1d222 100644 --- a/README +++ b/README @@ -30,7 +30,7 @@ Build binary and run natively: nix build && ./result/bin/Purr-musl Build and add Docker image to local registry: -nix build .#purrImage && docker load < result +nix build .#purr-docker && docker load < result DEVELOPMENT & SUPPORT diff --git a/flake.lock b/flake.lock index f3ca2a9..c890336 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1683067191, - "narHash": "sha256-41nOQDiYytmT6YVfI+X/Qo+rfIJOSuQ7OTAANAFp82o=", + "lastModified": 1683159243, + "narHash": "sha256-Fh41KQcZTswb4NyYfSsbNEhDS/Im0/Id6m3k7qZ6/Xw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a002cddf22e5f6c59c5cdeece1285c7ae9236d7d", + "rev": "3a227d4f883aa6b39b1772041494f38a9a427595", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e76b8e2..96fa37b 100644 --- a/flake.nix +++ b/flake.nix @@ -9,14 +9,13 @@ outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = nixpkgs.legacyPackages.${system}; + packageName = "purr"; + dockerPackageName = "${packageName}-docker"; haskellPackages = pkgs.haskellPackages; - jailbreakUnbreak = pkg: - pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; })); - - packageName = "purr"; + enableSharedExecutables = false; in { packages.${packageName} = haskellPackages.callCabal2nix packageName self rec { @@ -32,8 +31,9 @@ ]; inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system}); }; + devShell = self.devShells.${system}.default; - packages.purrImage = pkgs.dockerTools.buildImage { + packages.${dockerPackageName} = pkgs.dockerTools.buildImage { name = "purr"; copyToRoot = pkgs.buildEnv { name = "image-root";