Resolve cached naming issue; statically link Haskell dependencies
This commit is contained in:
parent
9efdc01828
commit
a05d227138
@ -1,8 +1,8 @@
|
|||||||
cabal-version: 1.12
|
cabal-version: 1.12
|
||||||
|
|
||||||
name: purr
|
name: Purr
|
||||||
version: 0.3.0
|
version: 0.3.0
|
||||||
description: https://git.eversole.co/purr
|
description: https://git.eversole.co/Purr
|
||||||
author: James Eversole
|
author: James Eversole
|
||||||
maintainer: james@eversole.co
|
maintainer: james@eversole.co
|
||||||
copyright: 2022 James Eversole
|
copyright: 2022 James Eversole
|
||||||
@ -65,7 +65,7 @@ library
|
|||||||
, wai-middleware-static >=0.5
|
, wai-middleware-static >=0.5
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
executable Purr-musl
|
executable Purr
|
||||||
main-is: Main.hs
|
main-is: Main.hs
|
||||||
other-modules:
|
other-modules:
|
||||||
Paths_Purr
|
Paths_Purr
|
||||||
|
2
README
2
README
@ -30,7 +30,7 @@ Build binary and run natively:
|
|||||||
nix build && ./result/bin/Purr-musl
|
nix build && ./result/bin/Purr-musl
|
||||||
|
|
||||||
Build and add Docker image to local registry:
|
Build and add Docker image to local registry:
|
||||||
nix build .#purrImage && docker load < result
|
nix build .#purr-docker && docker load < result
|
||||||
|
|
||||||
DEVELOPMENT & SUPPORT
|
DEVELOPMENT & SUPPORT
|
||||||
|
|
||||||
|
6
flake.lock
generated
6
flake.lock
generated
@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1683067191,
|
"lastModified": 1683159243,
|
||||||
"narHash": "sha256-41nOQDiYytmT6YVfI+X/Qo+rfIJOSuQ7OTAANAFp82o=",
|
"narHash": "sha256-Fh41KQcZTswb4NyYfSsbNEhDS/Im0/Id6m3k7qZ6/Xw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a002cddf22e5f6c59c5cdeece1285c7ae9236d7d",
|
"rev": "3a227d4f883aa6b39b1772041494f38a9a427595",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
12
flake.nix
12
flake.nix
@ -9,14 +9,13 @@
|
|||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
packageName = "purr";
|
||||||
|
dockerPackageName = "${packageName}-docker";
|
||||||
|
|
||||||
haskellPackages = pkgs.haskellPackages;
|
haskellPackages = pkgs.haskellPackages;
|
||||||
|
|
||||||
jailbreakUnbreak = pkg:
|
enableSharedExecutables = false;
|
||||||
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; }));
|
|
||||||
|
|
||||||
packageName = "purr";
|
|
||||||
in {
|
in {
|
||||||
packages.${packageName} =
|
packages.${packageName} =
|
||||||
haskellPackages.callCabal2nix packageName self rec {
|
haskellPackages.callCabal2nix packageName self rec {
|
||||||
@ -32,8 +31,9 @@
|
|||||||
];
|
];
|
||||||
inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system});
|
inputsFrom = map (__getAttr "env") (__attrValues self.packages.${system});
|
||||||
};
|
};
|
||||||
|
|
||||||
devShell = self.devShells.${system}.default;
|
devShell = self.devShells.${system}.default;
|
||||||
packages.purrImage = pkgs.dockerTools.buildImage {
|
packages.${dockerPackageName} = pkgs.dockerTools.buildImage {
|
||||||
name = "purr";
|
name = "purr";
|
||||||
copyToRoot = pkgs.buildEnv {
|
copyToRoot = pkgs.buildEnv {
|
||||||
name = "image-root";
|
name = "image-root";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user