Skip to content

Instantly share code, notes, and snippets.

@patrickod
Last active December 3, 2021 17:25
Show Gist options
  • Select an option

  • Save patrickod/faf79a066226a972eabd63dab841a065 to your computer and use it in GitHub Desktop.

Select an option

Save patrickod/faf79a066226a972eabd63dab841a065 to your computer and use it in GitHub Desktop.

Revisions

  1. patrickod renamed this gist Dec 3, 2021. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. patrickod revised this gist Nov 28, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flake.nix
    Original file line number Diff line number Diff line change
    @@ -14,7 +14,7 @@
    pkgs = import nixpkgs {
    inherit system overlays;
    };
    rust = pkgs.rust-bin."1.56.1".default.override {
    rust = pkgs.rust-bin.stable."1.56.1".default.override {
    extensions = [
    "clippy-preview"
    "rust-src"
  3. patrickod revised this gist Nov 21, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flake.nix
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    {
    description = "rust nannou graphics & art development";
    inputs = {
    nixpkgs.url = "github:patrickod/nixpkgs";
    nixpkgs.url = "github:nixos/nixpkgs";
    rust-overlay.url = "github:oxalica/rust-overlay";
    flake-utils.url = "github:numtide/flake-utils";
    };
  4. patrickod created this gist Nov 21, 2021.
    51 changes: 51 additions & 0 deletions flake.nix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,51 @@
    {
    description = "rust nannou graphics & art development";
    inputs = {
    nixpkgs.url = "github:patrickod/nixpkgs";
    rust-overlay.url = "github:oxalica/rust-overlay";
    flake-utils.url = "github:numtide/flake-utils";
    };

    outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
    flake-utils.lib.eachDefaultSystem (system:
    with nixpkgs;
    let
    overlays = [ (import rust-overlay) ];
    pkgs = import nixpkgs {
    inherit system overlays;
    };
    rust = pkgs.rust-bin."1.56.1".default.override {
    extensions = [
    "clippy-preview"
    "rust-src"
    "rustfmt-preview"
    "rust-analysis"
    ];
    };
    in
    {
    devShell = pkgs.mkShell rec {
    buildInputs = [
    rust
    pkgs.cmake
    pkgs.pkg-config
    pkgs.python39
    pkgs.alsa-lib

    pkgs.xorg.libX11
    pkgs.xorg.libXcursor
    pkgs.xorg.libXrandr
    pkgs.xorg.libXi

    pkgs.vulkan-tools
    pkgs.vulkan-headers
    pkgs.vulkan-loader
    pkgs.vulkan-validation-layers
    ];

    # important environment variables
    LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
    };
    }
    );
    }