Skip to content

Commit

Permalink
Merge pull request #119 from averyanalex/nixos
Browse files Browse the repository at this point in the history
feat: add devel nix package and devshell
  • Loading branch information
Rirusha authored Jul 23, 2024
2 parents 3f29ea8 + 6c12b87 commit 176d754
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# build dir
builddir*

# nix
result
.direnv

# Workspaces
*.code-workspace

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ yay -S cassette-git
pamac install cassette-git
```

### NixOS
```shell
nix run github:Rirusha/Cassette
```

## Установка в Windows

Способы установки приложения в Windows описаны [здесь](docs/INSTALLATION_ON_WINDOWS.md).
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
description = "GTK4/Adwaita application that allows you to use Yandex Music service on Linux operating systems";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = {
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem
(
system: let
pkgs = import nixpkgs {inherit system;};

nativeBuildInputs = with pkgs; [
blueprint-compiler
desktop-file-utils
meson
ninja
pkg-config
vala
];

buildInputs = with pkgs; [
glib-networking
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gstreamer
gtk4
json-glib
libadwaita
libgee
libsoup_3
libxml2
sqlite
webkitgtk_6_0
];
in {
packages.default = pkgs.stdenv.mkDerivation {
name = "cassette";
src = self;

mesonFlags = [
"-Dprofile=development"
];

nativeBuildInputs = with pkgs;
[
wrapGAppsHook4
git
]
++ nativeBuildInputs;

inherit buildInputs;

strictDeps = true;
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [alejandra] ++ nativeBuildInputs ++ buildInputs;
};
}
);
}

0 comments on commit 176d754

Please sign in to comment.