From 934085906c913080cd185a23d8c289d5b62269e4 Mon Sep 17 00:00:00 2001 From: nek0 Date: Thu, 24 Aug 2023 19:47:13 +0200 Subject: [PATCH] final flake fix --- flake.nix | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/flake.nix b/flake.nix index 4a18a91..e33f40e 100644 --- a/flake.nix +++ b/flake.nix @@ -13,28 +13,31 @@ nixos-lib = import (nixpkgs + "/nixos/lib") {}; - haskellPackages = pkgs.haskellPackages.override { + haskellPackages = pkgs.haskellPackages.override (old: { overrides = final: prev: { wavefront = jailbreakUnbreak prev.wavefront; + vulkan-tutorial = vulkan-tutorial; }; + }); + + vulkan-tutorial = # (ref:haskell-package-def) + haskellPackages.callCabal2nix packageName self { + # Dependency overrides go here + #wavefront = jailbreakUnbreak haskellPackages.wavefront; }; jailbreakUnbreak = pkg: - pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; })); + pkgs.haskell.lib.doJailbreak (pkgs.haskell.lib.markUnbroken pkg); packageName = "vulkan-tutorial"; in rec { packages = rec { - vulkan-tutorial = # (ref:haskell-package-def) - haskellPackages.callCabal2nix packageName self rec { - # Dependency overrides go here - wavefront = haskellPackages.wavefront; - }; + vulkan-tutorial = haskellPackages.vulkan-tutorial; default = vulkan-tutorial; }; - devShells.${system} = haskellPackages.shellFor { - packages = p: [ packages.vulkan-tutorial ]; + devShells.default = haskellPackages.shellFor { + packages = p: [ p.vulkan-tutorial ]; withHoogle = true; buildInputs = (with haskellPackages; [ haskell-language-server @@ -50,23 +53,6 @@ VK_LAYER_PATH="${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d"; SDL_VULKAN_LIBRARY="${pkgs.vulkan-loader}/lib/libvulkan.so"; }; - #devShells.${system} = pkgs.mkShell { - # buildInputs = with haskellPackages; [ - # haskell-language-server - # ghcid - # cabal-install - # ]; - # nativeBuildInputs = with pkgs; [ - # pkg-config - # SDL2 - # vulkan-validation-layers - # vulkan-headers - # vulkan-loader - # ]; - # inputsFrom = builtins.attrValues self.packages.${system}; - # VK_LAYER_PATH="${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d"; - # SDL_VULKAN_LIBRARY="${pkgs.vulkan-loader}/lib/libvulkan.so"; - #}; }); }