nix: increase nixfmt max width
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
80f9b62d25
commit
2d4cabe786
@ -171,11 +171,7 @@ let
|
|||||||
broadcast = { };
|
broadcast = { };
|
||||||
});
|
});
|
||||||
|
|
||||||
enablements =
|
enablements = (if allow_wayland then 1 else 0) + (if allow_x11 then 2 else 0) + (if allow_dbus then 4 else 0) + (if allow_pulse then 8 else 0);
|
||||||
(if allow_wayland then 1 else 0)
|
|
||||||
+ (if allow_x11 then 2 else 0)
|
|
||||||
+ (if allow_dbus then 4 else 0)
|
|
||||||
+ (if allow_pulse then 8 else 0);
|
|
||||||
|
|
||||||
mesa = if gpu then mesaWrappers else null;
|
mesa = if gpu then mesaWrappers else null;
|
||||||
nix_gl = if gpu then nixGL else null;
|
nix_gl = if gpu then nixGL else null;
|
||||||
|
26
flake.nix
26
flake.nix
@ -68,7 +68,7 @@
|
|||||||
cd ${./.}
|
cd ${./.}
|
||||||
|
|
||||||
echo "running nixfmt..."
|
echo "running nixfmt..."
|
||||||
nixfmt --check .
|
nixfmt --width=256 --check .
|
||||||
|
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
@ -115,21 +115,19 @@
|
|||||||
};
|
};
|
||||||
fsu = pkgs.callPackage ./cmd/fsu/package.nix { inherit (self.packages.${system}) fortify; };
|
fsu = pkgs.callPackage ./cmd/fsu/package.nix { inherit (self.packages.${system}) fortify; };
|
||||||
|
|
||||||
dist =
|
dist = pkgs.runCommand "${fortify.name}-dist" { inherit (self.devShells.${system}.default) buildInputs; } ''
|
||||||
pkgs.runCommand "${fortify.name}-dist" { inherit (self.devShells.${system}.default) buildInputs; }
|
# go requires XDG_CACHE_HOME for the build cache
|
||||||
''
|
export XDG_CACHE_HOME="$(mktemp -d)"
|
||||||
# go requires XDG_CACHE_HOME for the build cache
|
|
||||||
export XDG_CACHE_HOME="$(mktemp -d)"
|
|
||||||
|
|
||||||
# get a different workdir as go does not like /build
|
# get a different workdir as go does not like /build
|
||||||
cd $(mktemp -d) \
|
cd $(mktemp -d) \
|
||||||
&& cp -r ${fortify.src}/. . \
|
&& cp -r ${fortify.src}/. . \
|
||||||
&& chmod +w cmd && cp -r ${fsu.src}/. cmd/fsu/ \
|
&& chmod +w cmd && cp -r ${fsu.src}/. cmd/fsu/ \
|
||||||
&& chmod -R +w .
|
&& chmod -R +w .
|
||||||
|
|
||||||
export FORTIFY_VERSION="v${fortify.version}"
|
export FORTIFY_VERSION="v${fortify.version}"
|
||||||
./dist/release.sh && mkdir $out && cp -v "dist/fortify-$FORTIFY_VERSION.tar.gz"* $out
|
./dist/release.sh && mkdir $out && cp -v "dist/fortify-$FORTIFY_VERSION.tar.gz"* $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fhs = pkgs.buildFHSEnv {
|
fhs = pkgs.buildFHSEnv {
|
||||||
pname = "fortify-fhs";
|
pname = "fortify-fhs";
|
||||||
|
17
nixos.nix
17
nixos.nix
@ -77,21 +77,12 @@ in
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
session_bus =
|
session_bus = if app.dbus.session != null then (app.dbus.session (extendDBusDefault app.id)) else (extendDBusDefault app.id default);
|
||||||
if app.dbus.session != null then
|
|
||||||
(app.dbus.session (extendDBusDefault app.id))
|
|
||||||
else
|
|
||||||
(extendDBusDefault app.id default);
|
|
||||||
system_bus = app.dbus.system;
|
system_bus = app.dbus.system;
|
||||||
};
|
};
|
||||||
command = if app.command == null then app.name else app.command;
|
command = if app.command == null then app.name else app.command;
|
||||||
script = if app.script == null then ("exec " + command + " $@") else app.script;
|
script = if app.script == null then ("exec " + command + " $@") else app.script;
|
||||||
enablements =
|
enablements = with app.capability; (if wayland then 1 else 0) + (if x11 then 2 else 0) + (if dbus then 4 else 0) + (if pulse then 8 else 0);
|
||||||
with app.capability;
|
|
||||||
(if wayland then 1 else 0)
|
|
||||||
+ (if x11 then 2 else 0)
|
|
||||||
+ (if dbus then 4 else 0)
|
|
||||||
+ (if pulse then 8 else 0);
|
|
||||||
conf = {
|
conf = {
|
||||||
inherit (app) id;
|
inherit (app) id;
|
||||||
command = [
|
command = [
|
||||||
@ -165,9 +156,7 @@ in
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
pkgs.writeShellScriptBin app.name ''
|
pkgs.writeShellScriptBin app.name ''
|
||||||
exec fortify${
|
exec fortify${if app.verbose then " -v" else ""} app ${pkgs.writeText "fortify-${app.name}.json" (builtins.toJSON conf)} $@
|
||||||
if app.verbose then " -v" else ""
|
|
||||||
} app ${pkgs.writeText "fortify-${app.name}.json" (builtins.toJSON conf)} $@
|
|
||||||
''
|
''
|
||||||
) cfg.apps;
|
) cfg.apps;
|
||||||
in
|
in
|
||||||
|
@ -30,10 +30,7 @@ buildGoModule rec {
|
|||||||
src = builtins.path {
|
src = builtins.path {
|
||||||
name = "${pname}-src";
|
name = "${pname}-src";
|
||||||
path = lib.cleanSource ./.;
|
path = lib.cleanSource ./.;
|
||||||
filter =
|
filter = path: type: !(type == "regular" && (lib.hasSuffix ".nix" path || lib.hasSuffix ".py" path)) && !(type == "directory" && lib.hasSuffix "/cmd/fsu" path);
|
||||||
path: type:
|
|
||||||
!(type == "regular" && (lib.hasSuffix ".nix" path || lib.hasSuffix ".py" path))
|
|
||||||
&& !(type == "directory" && lib.hasSuffix "/cmd/fsu" path);
|
|
||||||
};
|
};
|
||||||
vendorHash = null;
|
vendorHash = null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user