Skip to content

Commit

Permalink
move version number into a file
Browse files Browse the repository at this point in the history
  • Loading branch information
Aylur committed Jan 14, 2024
1 parent d243a45 commit 3fce4ef
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
8 changes: 5 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};

outputs = { nixpkgs, self }: let
outputs = { nixpkgs, self }:
let
version = builtins.replaceStrings ["\n"] [""] (builtins.readFile ./version);
genSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"x86_64-linux"
];
pkgs = genSystems (system: import nixpkgs {inherit system;});
pkgs = genSystems (system: import nixpkgs { inherit system; });
in {
packages = genSystems (system: {
default = pkgs.${system}.callPackage ./nix {};
default = pkgs.${system}.callPackage ./nix { inherit version; };
});

homeManagerModules.default = import ./nix/hm-module.nix self;
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('ags', 'c',
version: '1.7.0',
version: run_command('cat', join_paths(meson.source_root(), 'version')).stdout().strip(),
meson_version: '>= 0.62.0',
license: ['GPL-3.0-or-later'],
default_options: [ 'warning_level=2', 'werror=false', ],
Expand Down
13 changes: 7 additions & 6 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
, gvfs
, libsoup_3
, libnotify
, extraPackages ? []
, extraPackages ? [ ]
, version ? "git"
}:

let
Expand All @@ -33,17 +34,17 @@ let
sha256 = "sha256-FosJwgTCp6/EI6WVbJhPisokRBA6oT0eo7d+Ya7fFX8=";
};
in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "ags";
version = "1.7.0";
inherit version;

src = buildNpmPackage {
name = "ags";
name = pname;
src = ../.;

dontBuild = true;

npmDepsHash = "sha256-VC3bhZNOuCBQq/uzdLUsSheOU+KhzftAccFKhlrf4Vk=";
npmDepsHash = "sha256-ucWdADdMqAdLXQYKGOXHNRNM9bhjKX4vkMcQ8q/GZ20=";

installPhase = ''
mkdir $out
Expand Down Expand Up @@ -91,6 +92,6 @@ stdenv.mkDerivation {
homepage = "https://github.com/Aylur/ags";
platforms = [ "x86_64-linux" "aarch64-linux" ];
license = licenses.gpl3;
meta.maintainers = [lib.maintainers.Aylur];
meta.maintainers = [ lib.maintainers.Aylur ];
};
}
4 changes: 2 additions & 2 deletions package-lock.json

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

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"name": "ags",
"version": "1.7.0",
"description": "description",
"main": "src/main.ts",
"repository": "",
"version": "1.0.0",
"repository": "https://github.com/Aylur/ags",
"author": "Aylur",
"license": "GPL",
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.7.0

0 comments on commit 3fce4ef

Please sign in to comment.