{ description = "A collection of reusable scripts for various use-cases"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; flutterBuildRaw = {stdenv}: stdenv.mkDerivation { pname = "flutter-build"; version = "0.1.0"; src = ./.; installPhase = '' mkdir -p $out/bin install --mode 555 src/flutter-build.sh $out/bin/flutter-build ''; }; flutter-build-raw = pkgs.callPackage flutterBuildRaw {}; in { packages = { # The raw flutter-build script inherit flutter-build-raw; # A wrapper around the script that already provides the notify-send option flutter-build = pkgs.writeScriptBin "flutter-build" '' ${flutter-build-raw}/bin/flutter-build \ --notify-send ${pkgs.libnotify}/bin/notify-send \ $@ ''; }; }); }