From c7916e9fae962c49280535f1b24df7c635584f28 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sat, 14 Dec 2024 12:19:34 +0000 Subject: [PATCH] flake: update and add `SDL2` and `SDL2_image` as runtime dependencies --- flake.lock | 39 --------------------------------------- flake.nix | 8 +++++++- 2 files changed, 7 insertions(+), 40 deletions(-) diff --git a/flake.lock b/flake.lock index ac72795..3fea347 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,5 @@ { "nodes": { - "fenix": { - "inputs": { - "nixpkgs": [ - "nixpkgs-unstable" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1710483719, - "narHash": "sha256-Ev/hJ59IAA3dWfTB3CWxMv/V/owO1yKyq0nwsek/d9o=", - "owner": "nix-community", - "repo": "fenix", - "rev": "d0439c495e5cd13ff252ade520ca620f52abb40b", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { "lastModified": 1710272261, @@ -39,28 +18,10 @@ }, "root": { "inputs": { - "fenix": "fenix", "nixpkgs-unstable": "nixpkgs-unstable", "utils": "utils" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1710430493, - "narHash": "sha256-KfmUsf/d62ANcFhSTR3BDIpk2ww0AcxXdi9lpZJ5UtQ=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "14558af15ee3d471bf8f4212f7609ae1f9647bc5", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index a1b69ec..eb2a01e 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,13 @@ # Executed by `nix run` apps.default = utils.lib.mkApp {drv = packages.default;}; # Used by `nix develop` - devShells.default = pkgs.mkShell rec { buildInputs = dependencies; }; + devShells.default = pkgs.mkShell rec { + buildInputs = dependencies; + shellHook = ''export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath [ + pkgs.SDL2 + pkgs.SDL2_image + ]}"''; + }; } ); }