Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions DIST
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
Generate bindist:

arm64

hell scripts/static-build.hell --stack-arch aarch64-linux --filename hell-linux-arm64 --ghc-version ghc-9.8.2 --docker-container hell

amd64

hell scripts/static-build.hell --stack-arch x86_64-linux --filename hell-linux-amd64 --ghc-version ghc-9.8.2 --docker-container hell-amd64
nix build .#static-arm64 -o hell-linux-arm64-dir
cp ./hell-linux-arm64-dir/bin/hell hell-linux-arm64
nix build .#static-amd64 -o hell-linux-amd64-dir
cp ./hell-linux-amd64-dir/bin/hell hell-linux-amd64
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 35 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
{
description = "hell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
flake-utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
overlay = final: prev: {
hell = prev.callCabal2nix "hell" ./. { };
pkgs = import nixpkgs { inherit system; };

pkgsStaticArm64 = import nixpkgs {
localSystem = system;
crossSystem = {
config = "aarch64-unknown-linux-musl";
isStatic = true;
};
};
pkgsStaticAmd64 = import nixpkgs {
localSystem = system;
crossSystem = {
config = "x86_64-unknown-linux-musl";
isStatic = true;
};
};
haskellPackages = pkgs.haskell.packages.ghc910.extend overlay;
in
{
# nix build
packages.default = haskellPackages.hell;

# nix develop
devShells.default = haskellPackages.shellFor {
packages = p: [ p.hell ];
buildInputs = with haskellPackages; [
stack
mkStaticApp = hp: hp.haskellPackages.callCabal2nix "hell" ./. {};

app = pkgs.haskellPackages.callCabal2nix "hell" ./. {};
in {
devShells.default = pkgs.haskellPackages.shellFor {
name = "hell-dev";
packages = _: [ app ];
withHoogle = true;
buildInputs = with pkgs.haskellPackages; [
cabal-install
haskell-language-server
pandoc-cli
fourmolu
hlint
pkgs.zlib
];
};
packages = {
default = app;
static-arm64 = mkStaticApp pkgsStaticArm64;
static-amd64 = mkStaticApp pkgsStaticAmd64;
};
}
);
}
2 changes: 0 additions & 2 deletions scripts/install-hell.hell

This file was deleted.

37 changes: 0 additions & 37 deletions scripts/static-build.hell

This file was deleted.

4 changes: 4 additions & 0 deletions scripts/static-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nix build .#static-arm64 -o hell-linux-arm64-dir
cp ./hell-linux-arm64-dir/bin/hell hell-linux-arm64
nix build .#static-amd64 -o hell-linux-amd64-dir
cp ./hell-linux-amd64-dir/bin/hell hell-linux-amd64
2 changes: 1 addition & 1 deletion src/Hell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ commandParser =

-- | Version of Hell.
hellVersion :: Text
hellVersion = "2026-04-21"
hellVersion = "2026-04-28"

-- | Dispatch on the command.
dispatch :: Command -> IO ()
Expand Down
Loading