Add script to update doomemacs to latest commit
Creates update-doomemacs.sh script that: - Fetches latest commit SHA from doomemacs/doomemacs repo - Automatically detects the default branch - Updates both rev and sha256 in home/roles/emacs/default.nix - Works from anywhere in the repo using git rev-parse Also adds a flake app so it can be run with: nix run .#update-doomemacs
This commit is contained in:
16
flake.nix
16
flake.nix
@@ -220,5 +220,21 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Flake apps
|
||||
apps = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ] (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
update-doomemacs = pkgs.writeShellScriptBin "update-doomemacs" ''
|
||||
export PATH="${pkgs.lib.makeBinPath [ pkgs.curl pkgs.jq pkgs.nix pkgs.git pkgs.gnused pkgs.gnugrep pkgs.coreutils ]}:$PATH"
|
||||
${builtins.readFile ./scripts/update-doomemacs.sh}
|
||||
'';
|
||||
in {
|
||||
update-doomemacs = {
|
||||
type = "app";
|
||||
program = "${update-doomemacs}/bin/update-doomemacs";
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user