Skip to content

Commit

Permalink
[𝚫] (penrose): moved to rust-stable from oxi's repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Icy-Thought committed Jul 5, 2023
1 parent 20ad27d commit 3180401
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 53 deletions.
71 changes: 70 additions & 1 deletion packages/orcinusWM/flake.lock

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

111 changes: 59 additions & 52 deletions packages/orcinusWM/flake.nix
Original file line number Diff line number Diff line change
@@ -1,65 +1,72 @@
# Regernate Cargo2Nix: nix run github:cargo2nix/cargo2nix
{
inputs = {
cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0";
flake-utils.follows = "cargo2nix/flake-utils";
nixpkgs.follows = "cargo2nix/nixpkgs";
rust.url = "github:oxalica/rust-overlay";
rust-overlay.url = "github:oxalica/rust-overlay";
};

outputs = inputs:
with inputs;
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
overlays = [cargo2nix.overlays.default];
};
outputs = {
self,
cargo2nix,
rust-overlay,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
overlays = [cargo2nix.overlays.default rust-overlay.overlays.default];
};

rustPkgs = pkgs.rustBuilder.makePackageSet {
rustChannel = "nightly";
packageFun = import ./default.nix;
packageOverrides = pkgs:
pkgs.rustBuilder.overrides.all
++ [
(pkgs.rustBuilder.rustLib.makeOverride {
name = "orcinus-wm";
overrideAttrs = drv: {
propagatedNativeBuildInputs =
drv.propagatedNativeBuildInputs
or []
++ [
pkgs.xorg.libxcb
pkgs.xorg.xmodmap
];
};
})
];
};

workspaceShell = rustPkgs.workspaceShell {
buildInputs = with pkgs; [
rust-analyzer
xorg.libxcb
xorg.xmodmap
alejandra
rustPkgs = pkgs.rustBuilder.makePackageSet {
rustChannel = "stable";
rustVersion = "1.70.0";
packageFun = import ./default.nix;
packageOverrides = pkgs:
pkgs.rustBuilder.overrides.all
++ [
(pkgs.rustBuilder.rustLib.makeOverride {
name = "orcinus-wm";
overrideAttrs = drv: {
propagatedNativeBuildInputs =
drv.propagatedNativeBuildInputs
or []
++ [
pkgs.xorg.libxcb
pkgs.xorg.xmodmap
];
};
})
];
};

nativeBuildInputs = with pkgs; [
rust-bin.stable.latest.default
];
};
in rec {
# Executed by `nix build`
packages = {
orcinusWM = (rustPkgs.workspace.orcinus-wm {}).bin;
default = packages.orcinusWM;
};
workspaceShell = rustPkgs.workspaceShell {
buildInputs = with pkgs; [
rust-analyzer
xorg.libxcb
xorg.xmodmap
alejandra
];

nativeBuildInputs = with pkgs; [
rust-bin.stable.latest.default
];
};
in rec {
# Executed by `nix build`
packages = {
orcinusWM = (rustPkgs.workspace.orcinus-wm {}).bin;
default = packages.orcinusWM;
};

# Used by `nix develop`
devShells.default = workspaceShell;
# Used by `nix develop`
devShells.default = workspaceShell;

# Executed by `nix run` :TODO| xephyr script on run
# apps.default = packages.orcinusWM;
}
);
# Executed by `nix run` :TODO| xephyr script on run
# apps.default = packages.orcinusWM;
}
);
}

0 comments on commit 3180401

Please sign in to comment.