final flake fix

This commit is contained in:
nek0 2023-08-24 19:47:13 +02:00
parent b4c74b4c0c
commit 6d625cabf6

View file

@ -13,28 +13,31 @@
nixos-lib = import (nixpkgs + "/nixos/lib") {}; nixos-lib = import (nixpkgs + "/nixos/lib") {};
haskellPackages = pkgs.haskellPackages.override { haskellPackages = pkgs.haskellPackages.override (old: {
overrides = final: prev: { overrides = final: prev: {
wavefront = jailbreakUnbreak prev.wavefront; 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: jailbreakUnbreak = pkg:
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: { meta = { }; })); pkgs.haskell.lib.doJailbreak (pkgs.haskell.lib.markUnbroken pkg);
packageName = "vulkan-tutorial"; packageName = "vulkan-tutorial";
in rec { in rec {
packages = rec { packages = rec {
vulkan-tutorial = # (ref:haskell-package-def) vulkan-tutorial = haskellPackages.vulkan-tutorial;
haskellPackages.callCabal2nix packageName self rec {
# Dependency overrides go here
wavefront = haskellPackages.wavefront;
};
default = vulkan-tutorial; default = vulkan-tutorial;
}; };
devShells.${system} = haskellPackages.shellFor { devShells.default = haskellPackages.shellFor {
packages = p: [ packages.vulkan-tutorial ]; packages = p: [ p.vulkan-tutorial ];
withHoogle = true; withHoogle = true;
buildInputs = (with haskellPackages; [ buildInputs = (with haskellPackages; [
haskell-language-server haskell-language-server
@ -49,23 +52,6 @@
VK_LAYER_PATH="${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d"; VK_LAYER_PATH="${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d";
SDL_VULKAN_LIBRARY="${pkgs.vulkan-loader}/lib/libvulkan.so"; 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";
#};
}); });
} }