Static linking part 2
Some checks failed
Test, Build, and Release / test (push) Failing after 3h6m55s
Test, Build, and Release / build (push) Has been cancelled

This commit is contained in:
James Eversole 2025-02-07 19:22:31 -06:00
parent ad1918aa6f
commit fccee3e61c
3 changed files with 68 additions and 39 deletions

44
flake.lock generated
View File

@ -18,25 +18,55 @@
"type": "github"
}
},
"nh2pkgs": {
"flake": false,
"locked": {
"lastModified": 1718490232,
"narHash": "sha256-0Fh3aJZuTJVmiiKY/5SyvHlfhZ3HeZTDUQnd+Fx6/Qo=",
"type": "tarball",
"url": "https://github.com/nh2/nixpkgs/archive/ede5282c487a1fd2de64303ba59adad6726f1225.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/nh2/nixpkgs/archive/ede5282c487a1fd2de64303ba59adad6726f1225.tar.gz"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1734566935,
"narHash": "sha256-cnBItmSwoH132tH3D4jxmMLVmk8G5VJ6q/SC3kszv9E=",
"lastModified": 1738797219,
"narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "087408a407440892c1b00d80360fd64639b8091d",
"rev": "1da52dd49a127ad74486b135898da2cef8c62665",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"nh2pkgs": "nh2pkgs",
"nixpkgs": "nixpkgs",
"static-haskell-nix": "static-haskell-nix"
}
},
"static-haskell-nix": {
"flake": false,
"locked": {
"lastModified": 1718492291,
"narHash": "sha256-XbBHPJk3ln+uLW+Dsio7vJNYnsHhmqenbI7cLsP8kHg=",
"owner": "nh2",
"repo": "static-haskell-nix",
"rev": "481e7d73ca624278ef0f840a0a2ba09e3a583217",
"type": "github"
},
"original": {
"owner": "nh2",
"repo": "static-haskell-nix",
"type": "github"
}
},
"systems": {

View File

@ -2,7 +2,7 @@
description = "tricu";
inputs = {
nixpkgs = {
nh2pkgs = {
url = "https://github.com/nh2/nixpkgs/archive/ede5282c487a1fd2de64303ba59adad6726f1225.tar.gz";
type = "tarball";
flake = false;
@ -11,48 +11,47 @@
url = "github:nh2/static-haskell-nix";
flake = false;
};
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, static-haskell-nix }:
let
system = "x86_64-linux";
compiler = "ghc948";
packageName = "tricu";
outputs = { self, flake-utils, nh2pkgs, nixpkgs, static-haskell-nix }:
flake-utils.lib.eachDefaultSystem (system:
let
compiler = "ghc948";
packageName = "tricu";
overlay = self: super: {
haskell = super.haskell // {
packages = super.haskell.packages // {
${compiler} = super.haskell.packages.${compiler}.override {
overrides = final: prev: {
${packageName} = prev.callCabal2nix packageName ./. {};
overlay = self: super: {
haskell = super.haskell // {
packages = super.haskell.packages // {
${compiler} = super.haskell.packages.${compiler}.override {
overrides = final: prev: {
${packageName} = prev.callCabal2nix packageName ./. {};
};
};
};
};
};
};
overlays = [overlay];
overlays = [overlay];
normalPkgs = import nixpkgs { inherit overlays system; };
pkgs = import nh2pkgs { inherit overlays system; };
survey = import "${static-haskell-nix}/survey" { inherit compiler normalPkgs; };
survey = import "${static-haskell-nix}/survey" { inherit compiler pkgs; };
tricuStatic = survey.haskellPackages.${packageName};
tricuStatic = survey.haskellPackages.${packageName};
in {
packages.${system}.default = tricuStatic;
in {
packages.default = tricuStatic;
devShells.default = normalPkgs.mkShell {
buildInputs = with normalPkgs; [
normalPkgs.haskellPackages.cabal-install
normalPkgs.haskellPackages.ghc-events
normalPkgs.haskellPackages.ghcid
normalPkgs.upx
];
inputsFrom = builtins.attrValues self.packages.${system};
};
devShell = self.devShells.${system}.default;
};
devShells.default = pkgs.mkShell {
buildInputs = with survey; [
haskellPackages.cabal-install
haskellPackages.ghc-events
haskellPackages.ghcid
] ++ [pkgs.upx];
inputsFrom = builtins.attrValues self.packages.${system};
};
devShell = self.devShells.${system}.default;
});
}

View File

@ -1,7 +1,7 @@
cabal-version: 1.12
name: tricu
version: 0.18.0
version: 0.18.1
description: A micro-language for exploring Tree Calculus
author: James Eversole
maintainer: james@eversole.co