diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..58966e9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1750776420, + "narHash": "sha256-/CG+w0o0oJ5itVklOoLbdn2dGB0wbZVOoDm4np6w09A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "30a61f056ac492e3b7cdcb69c1e6abdcf00e39cf", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-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..3669f92 --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + outputs = + { self, nixpkgs, ... }: + let + supportedSystems = [ + "aarch64-linux" + "x86_64-linux" + "aarch64-darwin" + "x86_64-darwin" + ]; + forEachSupportedSystem = + f: + nixpkgs.lib.genAttrs supportedSystems ( + system: + f { + pkgs = import nixpkgs { inherit system; }; + } + ); + in + { + packages = forEachSupportedSystem ( + { pkgs }: + { + default = pkgs.stdenv.mkDerivation { + name = "custom-css"; + src = ./.; + nativeBuildInputs = with pkgs; [ + pkg-config + ]; + buildInputs = with pkgs; [ + emacs-pgtk gtk3 + ]; + installPhase = '' + mkdir -p $out/lib + cp *.so $out/lib/ + ''; + }; + } + ); + }; +}