From 55e3e91d187afbf43a617cdbd0a1520a60aebc07 Mon Sep 17 00:00:00 2001 From: Leon Vatthauer Date: Sat, 28 Oct 2023 12:34:15 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9D=84=20added=20nix=20devshell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .envrc | 1 + flake.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 15 ++++++++++++++ shell.nix | 23 ++++++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..55f037c --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1698288402, + "narHash": "sha256-jIIjApPdm+4yt8PglX8pUOexAdEiAax/DXW3S/Mb21E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "60b9db998f71ea49e1a9c41824d09aa274be1344", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..4bc100c --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "Flake for compiling my bachelor's thesis"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let pkgs = nixpkgs.legacyPackages.${system}; in + { + devShells.default = import ./shell.nix { inherit pkgs; }; + } + ); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..843779e --- /dev/null +++ b/shell.nix @@ -0,0 +1,23 @@ +{ pkgs ? import { } }: +with pkgs; +mkShell { + buildInputs = [ + (agda.withPackages [ + agdaPackages.standard-library + (agdaPackages.agda-categories.overrideAttrs (oldAttrs : { + version = "0.1.8"; + src = fetchFromGitHub { + repo = "agda-categories"; + owner = "Reijix"; + rev = "102a0c46c7c9be4e47085b745abd1c486b86f0e7"; + hash = "sha256-1LzbtsqEPSfAyOztqNOG/pT6g1zsyc6lY2NwQqBZQZ8="; + }; + })) + ]) + ]; + + shellHook = '' + # ... + ''; +} +