From 3f69c3d2eb046be51dd4021bf730779500b8d330 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Thu, 29 Jul 2021 14:53:43 +0000 Subject: [PATCH] Add default.nix to make this easy to build --- .gitignore | 1 + default.nix | 21 +++++++++++++++++++++ shell.nix | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 default.nix diff --git a/.gitignore b/.gitignore index ea8c4bf..97e3b2f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +/result /target diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..3364056 --- /dev/null +++ b/default.nix @@ -0,0 +1,21 @@ +{ pkgs ? import { } }: +with pkgs; + +rustPlatform.buildRustPackage rec { + name = "rustybar"; + version = "0.1"; + src = ./.; + cargoLock.lockFile = ./Cargo.lock; + RUSTC_BOOTSTRAP = 1; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ dbus ]; + + meta = with lib; { + homepage = "https://github.com/mildlyfunctionalgays/rustybar"; + description = "swaybar/i3bar command in Rust"; + maintainers = with maintainers; [ artemist ]; + license = with licenses; [ mit ]; + platforms = platforms.linux; + }; +} + diff --git a/shell.nix b/shell.nix index 6a39c58..30a357d 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,4 @@ -{ pkgs ? import {} }: +{ pkgs ? import { } }: with pkgs; stdenv.mkDerivation { name = "rustybar-env";