From d23e51da7a1bdea06016e26ed68c30251897fc6f Mon Sep 17 00:00:00 2001 From: Yves Pares Date: Tue, 12 Nov 2024 15:23:37 +0100 Subject: [PATCH] Added flake.nix --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 24 ++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..d3fd202 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1731245184, + "narHash": "sha256-vmLS8+x+gHRv1yzj3n+GTAEObwmhxmkkukB2DwtJRdU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "aebe249544837ce42588aa4b2e7972222ba12e8f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..85c06c4 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; + + outputs = inputs: + let forEachSystem = inputs.nixpkgs.lib.genAttrs inputs.nixpkgs.lib.systems.flakeExposed; + in { + packages = forEachSystem (system: + let pkgs = import inputs.nixpkgs { inherit system; }; + jj-fzf = pkgs.writeShellApplication { + name = "jj-fzf"; + runtimeInputs = with pkgs; [ jujutsu fzf gawk gnused ]; + text = '' + ${./jj-fzf} "$@" + ''; + }; + in { + inherit jj-fzf; + default = jj-fzf; + } + ); + }; +}