enable flakes

This commit is contained in:
Rongsong Shen 2025-08-22 09:38:44 +08:00
parent a6409c249a
commit c5ffccf45c
4 changed files with 35 additions and 8 deletions

View file

@ -1,7 +1,4 @@
# default.nix
let
pkgs = import <nixpkgs> { config = {}; overlays = []; };
in
{pkgs,...}:
{
xbuild = pkgs.callPackage ./pkgs/x/xbuild/package.nix {};
cedro = pkgs.callPackage ./pkgs/c/cedro/package.nix {};

View file

@ -13,9 +13,9 @@
{
packages = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
xbuild = pkgs.callPackage ./pkgs/x/xbuild/package.nix {};
cedro = pkgs.callPackage ./pkgs/c/cedro/package.nix {};
});
in
import ./default.nix { inherit pkgs; });
};
}

29
pkgs/c/cedro/package.nix Normal file
View file

@ -0,0 +1,29 @@
# cedro.nix
{
lib,
stdenv,
fetchFromGitHub,
zip,
...
}:
stdenv.mkDerivation {
pname = "cedro";
version = "0.0.1";
src = fetchFromGitHub {
owner = "shen390s";
repo = "cedro";
rev = "master";
sha256 = "sha256-DLq7vC+4k2TMy5jKvQkFTy+xZmpvl0+DiWcd7CBVbgw=";
};
nativeBuildInputs = [
zip
];
installPhase = ''
mkdir -p $out/bin
cp bin/* $out/bin
'';
}

View file

@ -6,6 +6,7 @@
autoconf,
automake,
libtool,
...
}:
stdenv.mkDerivation {