add flake scaffolding
4 files changed, 94 insertions(+), 0 deletions(-)
changed files
A .envrc
@@ -0,0 +1,7 @@ +#!/usr/bin/env bash +if type -P lorri &>/dev/null; then + eval "$(lorri direnv --flake .)" +else + echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' + use flake +fi
A default.nix
@@ -0,0 +1,16 @@ +{ + lib, + buildFishPlugin, + ... +}: +buildFishPlugin { + pname = "scriptura"; + version = "0.0.1"; + src = ./.; + + meta = { + description = "A fish plugin for scriptura"; + homepage = "https://codeberg.org/alinnow/scriptura"; + license = lib.licenses.mit; + }; +}
A flake.lock
@@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1768875095, + "narHash": "sha256-dYP3DjiL7oIiiq3H65tGIXXIT1Waiadmv93JS0sS+8A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ed142ab1b3a092c4d149245d0c4126a5d7ea00b0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +}
A flake.nix
@@ -0,0 +1,44 @@ +{ + description = "A Nix-flake-based Shell development environment"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + }; + + outputs = + { self, ... }@inputs: + + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forEachSupportedSystem = + f: + inputs.nixpkgs.lib.genAttrs supportedSystems ( + system: + f { + pkgs = import inputs.nixpkgs { inherit system; }; + } + ); + in + { + devShells = forEachSupportedSystem ( + { pkgs }: + { + default = pkgs.mkShellNoCC { + packages = with pkgs; [ fish ]; + }; + } + ); + packages = forEachSupportedSystem ( + { pkgs }: + rec { + scriptura = pkgs.callPackage ./default.nix { }; + default = scriptura; + } + ); + }; +}