From 23c65a00a8e177dc3f4296ea2d180cbb2a05d2fa Mon Sep 17 00:00:00 2001 From: Bill Ewanick Date: Sun, 2 Mar 2025 15:05:33 -0500 Subject: [PATCH] Apply nix-rfc formatting to flake --- flake.nix | 151 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 78 insertions(+), 73 deletions(-) diff --git a/flake.nix b/flake.nix index c88a9c4..4e07ccd 100644 --- a/flake.nix +++ b/flake.nix @@ -32,87 +32,92 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; - outputs = { self, nixpkgs }: { - devShell.x86_64-linux = - let - pkgs = nixpkgs.legacyPackages.x86_64-linux; + outputs = + { self, nixpkgs }: + { + devShell.x86_64-linux = + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; - ghc' = pkgs.haskell.packages.ghc928.ghcWithHoogle (self: with self; - [ - relude - split + ghc' = pkgs.haskell.packages.ghc928.ghcWithHoogle ( + self: with self; [ + relude + split - aeson - random - neat-interpolation + aeson + random + neat-interpolation - # maths - primes - arithmoi + # maths + primes + arithmoi - # graphing libraries! - # Chart - # Chart-cairo - ] - ); + # graphing libraries! + # Chart + # Chart-cairo + ] + ); - clean = pkgs.writeShellScriptBin "clean" '' - # Delete executables - find . -type f -executable -not -path '*/.git/*' -delete + clean = pkgs.writeShellScriptBin "clean" '' + # Delete executables + find . -type f -executable -not -path '*/.git/*' -delete - # Delete all Haskell IR files - find . -type f -name '*.hi' -delete - find . -type f -name '*.o' -delete + # Delete all Haskell IR files + find . -type f -name '*.hi' -delete + find . -type f -name '*.o' -delete - # Delete any test graphs created - find . -type f -name '*.png' -delete - ''; - in - pkgs.mkShell { - buildInputs = with pkgs.haskellPackages; [ - ghc' + # Delete any test graphs created + find . -type f -name '*.png' -delete + ''; + in + pkgs.mkShell { + buildInputs = + with pkgs.haskellPackages; + [ + ghc' - haskell-language-server - ghcid - hlint - ] ++ (with pkgs; [ - kotlin - jdk23 - nixfmt-rfc-style - - # Scripts - clean - ]); + haskell-language-server + ghcid + hlint + ] + ++ (with pkgs; [ + kotlin + jdk23 + nixfmt-rfc-style - shellHook = '' - echo ".------..------..------..------..------..------..------..------..------..------." - echo "|U.--. ||N.--. ||I.--. ||V.--. ||E.--. ||R.--. ||S.--. ||A.--. ||L.--. ||=.--. |" - echo "| (\/) || :(): || (\/) || :(): || (\/) || :(): || :/\: || (\/) || :/\: || (\/) |" - echo "| :\/: || ()() || :\/: || ()() || :\/: || ()() || :\/: || :\/: || (__) || :\/: |" - echo "| '--'U|| '--'N|| '--'I|| '--'V|| '--'E|| '--'R|| '--'S|| '--'A|| '--'L|| '--'=|" - echo "[------'[------'[------'[------'[------'[------'[------'[------'[------'[------'" - echo ".------..------..------..------..------..------..------..------..------..------." - echo "|C.--. ||A.--. ||L.--. ||C.--. ||U.--. ||L.--. ||A.--. ||T.--. ||O.--. ||R.--. |" - echo "| :/\: || (\/) || :/\: || :/\: || (\/) || :/\: || (\/) || :/\: || :/\: || :(): |" - echo "| :\/: || :\/: || (__) || :\/: || :\/: || (__) || :\/: || (__) || :\/: || ()() |" - echo "| '--'C|| '--'A|| '--'L|| '--'C|| '--'U|| '--'L|| '--'A|| '--'T|| '--'O|| '--'R|" - echo "[------'[------'[------'[------'[------'[------'[------'[------'[------'[------'" + # Scripts + clean + ]); - echo " _ _ _ _ " - echo "| | | | (_) | | ______ " - echo "| | | | _ __ _ __ __ ___ _ __ ___ __ _ | ||______|" - echo "| | | || '_ \ | |\ \ / / / _ \| '__|/ __| / _[ || | ______ " - echo "| |_| || | | || | \ V / | __/| | \__ \| (_| || ||______|" - echo " \___/ |_| |_||_| \_/ \___||_| |___/ \__,_||_| " - echo " " - echo " " - echo " _____ _ _ _ " - echo "/ __ \ | | | | | | " - echo "| / \/ __ _ | | ___ _ _ | | __ _ | |_ ___ _ __ " - echo "| | / _[ || | / __|| | | || | / _[ || __| / _ \ | '__| " - echo "| \__/\| (_| || || (__ | |_| || || (_| || |_ | (_) || | " - echo " \____/ \__,_||_| \___| \__,_||_| \__,_| \__| \___/ |_| " - ''; - }; - }; + shellHook = '' + echo ".------..------..------..------..------..------..------..------..------..------." + echo "|U.--. ||N.--. ||I.--. ||V.--. ||E.--. ||R.--. ||S.--. ||A.--. ||L.--. ||=.--. |" + echo "| (\/) || :(): || (\/) || :(): || (\/) || :(): || :/\: || (\/) || :/\: || (\/) |" + echo "| :\/: || ()() || :\/: || ()() || :\/: || ()() || :\/: || :\/: || (__) || :\/: |" + echo "| '--'U|| '--'N|| '--'I|| '--'V|| '--'E|| '--'R|| '--'S|| '--'A|| '--'L|| '--'=|" + echo "[------'[------'[------'[------'[------'[------'[------'[------'[------'[------'" + echo ".------..------..------..------..------..------..------..------..------..------." + echo "|C.--. ||A.--. ||L.--. ||C.--. ||U.--. ||L.--. ||A.--. ||T.--. ||O.--. ||R.--. |" + echo "| :/\: || (\/) || :/\: || :/\: || (\/) || :/\: || (\/) || :/\: || :/\: || :(): |" + echo "| :\/: || :\/: || (__) || :\/: || :\/: || (__) || :\/: || (__) || :\/: || ()() |" + echo "| '--'C|| '--'A|| '--'L|| '--'C|| '--'U|| '--'L|| '--'A|| '--'T|| '--'O|| '--'R|" + echo "[------'[------'[------'[------'[------'[------'[------'[------'[------'[------'" + + echo " _ _ _ _ " + echo "| | | | (_) | | ______ " + echo "| | | | _ __ _ __ __ ___ _ __ ___ __ _ | ||______|" + echo "| | | || '_ \ | |\ \ / / / _ \| '__|/ __| / _[ || | ______ " + echo "| |_| || | | || | \ V / | __/| | \__ \| (_| || ||______|" + echo " \___/ |_| |_||_| \_/ \___||_| |___/ \__,_||_| " + echo " " + echo " " + echo " _____ _ _ _ " + echo "/ __ \ | | | | | | " + echo "| / \/ __ _ | | ___ _ _ | | __ _ | |_ ___ _ __ " + echo "| | / _[ || | / __|| | | || | / _[ || __| / _ \ | '__| " + echo "| \__/\| (_| || || (__ | |_| || || (_| || |_ | (_) || | " + echo " \____/ \__,_||_| \___| \__,_||_| \__,_| \__| \___/ |_| " + ''; + }; + }; }